During testing, we have discovered a bug which affects all safari mobile versions < v13. The bug is related to the use of the nullish coalescing operator (??), which somehow does not work correctly in the current jaxon lib in these safari versions. We have verified this issue on browserstack.com on multiple different real devices using ios < v13, as well as on 1 device at hand. The error thrown in the console on the affected ios devices is the following:
jaxon.core.min.js:1 SyntaxError: Unexpected token '?'(anonymous function) @ jaxon.core.min.js:1
VM54 en:4356 TypeError: undefined is not an object (evaluating 'jaxon.dom.ready')
Which then leads to subsequential calls to jaxon failing like this:
jQuery.Deferred exception: jaxon.request is not a function. (In 'jaxon.request(
{ jxnfun: 'getBanners' },
{ parameters: arguments }
)', 'jaxon.request' is undefined) xajax_getBanners
TypeError: jaxon.request is not a function. (In 'jaxon.request(
{ jxnfun: 'getBanners' },
{ parameters: arguments }
)', 'jaxon.request' is undefined)
SOLUTION / FIX
We have implemented a temporary fix in the file jaxon.core.js, which seems to fix the problem, basically ?? changed to ? :
-> But There might be a more elegant fix, we have not deeply investigated this, but this does fix the problem.
file jaxon.core.js
line 2807:
Old code:
oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ?? '';
New Code:
oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ? jaxon.ajax.parameters.bags[sBag] : '';
line 2842:
Old code:
oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ?? '';
New Code:
oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ? jaxon.ajax.parameters.bags[sBag] : '';
line 3208:
Old code:
const oRequest = functionArgs ?? {};
New Code:
const oRequest = functionArgs ? functionArgs : {};
Hopefully that helps, and thanks again for this great project!
PROBLEM
During testing, we have discovered a bug which affects all safari mobile versions < v13. The bug is related to the use of the nullish coalescing operator (??), which somehow does not work correctly in the current jaxon lib in these safari versions. We have verified this issue on browserstack.com on multiple different real devices using ios < v13, as well as on 1 device at hand. The error thrown in the console on the affected ios devices is the following:
jaxon.core.min.js:1 SyntaxError: Unexpected token '?'(anonymous function) @ jaxon.core.min.js:1 VM54 en:4356 TypeError: undefined is not an object (evaluating 'jaxon.dom.ready')
Which then leads to subsequential calls to jaxon failing like this:
jQuery.Deferred exception: jaxon.request is not a function. (In 'jaxon.request( { jxnfun: 'getBanners' }, { parameters: arguments } )', 'jaxon.request' is undefined) xajax_getBanners
TypeError: jaxon.request is not a function. (In 'jaxon.request( { jxnfun: 'getBanners' }, { parameters: arguments } )', 'jaxon.request' is undefined)
SOLUTION / FIX
We have implemented a temporary fix in the file jaxon.core.js, which seems to fix the problem, basically ?? changed to ? : -> But There might be a more elegant fix, we have not deeply investigated this, but this does fix the problem.
file jaxon.core.js line 2807: Old code: oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ?? ''; New Code: oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ? jaxon.ajax.parameters.bags[sBag] : '';
line 2842: Old code: oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ?? ''; New Code: oValues[sBag] = jaxon.ajax.parameters.bags[sBag] ? jaxon.ajax.parameters.bags[sBag] : '';
line 3208: Old code: const oRequest = functionArgs ?? {}; New Code: const oRequest = functionArgs ? functionArgs : {};
Hopefully that helps, and thanks again for this great project!
-Chris