From 4ce311216f192b95aeb8ba4022f6eab817622ed0 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Feb 2021 11:40:52 +0100 Subject: [PATCH] Fix PCS --- www/common/common-ui-elements.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 41e78bf6d..77fc14a48 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -2107,11 +2107,13 @@ define([ var privateData = metadataMgr.getPrivateData(); if (privateData.offline) { - metadataMgr.onChange(function () { + var onChange = function () { var privateData = metadataMgr.getPrivateData(); if (privateData.offline) { return; } UIElements.getPadCreationScreen(common, cfg, appCfg, cb); - }); + metadataMgr.off('change', onChange); + }; + metadataMgr.onChange(onChange); return; }