diff options
author | Henry Castro <hcastro@collabora.com> | 2020-12-03 08:32:01 -0400 |
---|---|---|
committer | Jan Holesovsky <holesovsky@gmail.com> | 2021-01-21 14:55:44 +0100 |
commit | 9de8b3735e29d7b4638afb0f703de937d17c93ae (patch) | |
tree | 189b8732c5042126c27e07f51d482e5f403cff63 | |
parent | Bump package version to 6.4.4-3 (diff) | |
download | online-9de8b3735e29d7b4638afb0f703de937d17c93ae.tar.gz online-9de8b3735e29d7b4638afb0f703de937d17c93ae.zip |
mobilewizard: warn children data type check
Occurs when using the latest LO master branch
the mobile wizard fails:
Util.js:107 Uncaught RangeError: Maximum call stack size exceeded
at String.split (<anonymous>)
at Object.splitWords (Util.js:107)
at NewClass.on (Events.js:20)
at Function.listenNumericChanges (Control.JSDialogBuilder.js:124)
at _formattedfieldControl (Control.JSDialogBuilder.js:1312)
at NewClass.build (Control.MobileWizardBuilder.js:145)
at NewClass.build (Control.MobileWizardBuilder.js:150)
at NewClass.build (Control.MobileWizardBuilder.js:150)
at NewClass.build (Control.MobileWizardBuilder.js:150)
at NewClass.build (Control.MobileWizardBuilder.js:150)
The builder recursive looks like an infinity loop,
and the cause is that the server is not sending the array children
data type.
Change-Id: I298c239b6018a457d3825be886ea22cb984f13cc
Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | loleaflet/src/layer/tile/TileLayer.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 41268e807d..60b531ae48 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1045,6 +1045,12 @@ L.TileLayer = L.GridLayer.extend({ _onJSDialogMsg: function (textMsg) { if (window.mode.isMobile()) { var msgData = JSON.parse(textMsg.substring('jsdialog:'.length + 1)); + + if (msgData.children && !L.Util.isArray(msgData.children)) { + console.warn('_onJSDialogMsg: The children\'s data should be created of array type'); + return; + } + if (msgData.type == 'borderwindow') return; if (msgData.enabled) { |