js-url-gen icon indicating copy to clipboard operation
js-url-gen copied to clipboard

createCloudinaryURL breaks SSR

Open robdixon-netc opened this issue 1 year ago • 3 comments

Since when using version 1.10.0 we were seeing the following error when trying to use SSR:

JsRuntimeException: ReferenceError: URLSearchParams is not defined
at createCloudinaryURL (server.js:2:339702) -> …URI(i).replace(/\?/g,"%3F").replace(/=/g,"%3D"),n=new URLSearchParams(this.urlConfig.queryParams);!1…
at toURL (server.js:2:341974)
at Ld (server.js:2:349424)
at SplitContent (server.js:2:575857)
at i (server.js:2:28626)
at server.js:2:29644
at t.render (server.js:2:29677)
at t.read (server.js:2:27548)
at t.renderToString (server.js:2:34395)
at Script [4]:1:16

Reverting back to 1.9.2 resolves the issue

robdixon-netc avatar Apr 27 '23 11:04 robdixon-netc