Running this code:
Works fine in one page of my apps, but gives this error output in another:
Before If...
code.js:41 schemaFiles
code.js:2 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'replace')
at Object.fn_3177f445c3270672da948e142ec2484d (code.js:2:20)
at Object.fn_c798cac1ca8b24f5e8a180fe3a1b0a7a (code.js:9:91)
at onContentAssignment (bundle.js:29:86)
at run (sdk.js:16:229747)
at sdk.js:16:230018
at fk (sdk.js:16:985727)
at W.unstable_runWithPriority (sdk.js:16:1018857)
at gg (sdk.js:16:924903)
at Oj (sdk.js:16:985182)
at sdk.js:16:985093
fn_3177f445c3270672da948e142ec2484d @ code.js:2
fn_c798cac1ca8b24f5e8a180fe3a1b0a7a @ code.js:9
onContentAssignment @ bundle.js:29
run @ sdk.js:16
(anonymous) @ sdk.js:16
fk @ sdk.js:16
W.unstable_runWithPriority @ sdk.js:16
gg @ sdk.js:16
Oj @ sdk.js:16
(anonymous) @ sdk.js:16
V @ sdk.js:16
Pe.port1.onmessage @ sdk.js:16
Promise.then (async)
run @ sdk.js:16
(anonymous) @ sdk.js:16
fk @ sdk.js:16
W.unstable_runWithPriority @ sdk.js:16
gg @ sdk.js:16
Oj @ sdk.js:16
(anonymous) @ sdk.js:16
V @ sdk.js:16
Pe.port1.onmessage @ sdk.js:16
code.js:42 true
code.js:44 Inside If...
code.js:46 schema:
code.js:47 (11) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
code.js:48 Etter
The Uncaught error as I said appears in one page only, but that one returns fine:
Before If...
code.js:41 schemaFiles
code.js:42 true
code.js:44 Inside If...
code.js:46 schema:
code.js:47 (11) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
code.js:48 Etter
What am I doing wrong here?