Rails 6. SyntaxError: missing ) in parenthetical (UJS)

I use pagination ajax (kaminari and pagy gem), click more page not work. how it

  var colum = document.querySelector("#categories_index");
  var pagin = document.querySelector("#categories_index_paginate");

  colum.innerHTML += ("<%= j render(partial: 'article/posts/post', collection: @posts, cached: true) %>");
  pagin.innerHTML = ("<%= render(partial: 'next_link') %>");

``

SyntaxError: missing ) in parenthetical

I not use JQuery.

use only “@rails/ujs”: “^6.0.0” webpacker.

Rails -v 6.0.0. Ruby -v 2.6.1

Help! Thanks!!!

Can you show the generated response of the request? try using the escape_javascript on the second render too (“j render…”, the “j” at the beginning).