From ce3613ab5423a79a03d448df0c2430c87f5b7a51 Mon Sep 17 00:00:00 2001 From: Jelte Lagendijk Date: Thu, 5 Apr 2018 14:47:25 +0200 Subject: [PATCH] Check if HTML element is present --- package.json | 2 +- src/CustomString/widget/CustomString.js | 4 +++- src/package.xml | 2 +- test/widgets/CustomString.mpk | Bin 6120 -> 6122 bytes 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cd7c2e4..803266e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CustomString", - "version": "2.2.5", + "version": "2.2.6", "description": "Create a string with a microflow", "license": "", "author": "", diff --git a/src/CustomString/widget/CustomString.js b/src/CustomString/widget/CustomString.js index 45eea66..cb061d6 100644 --- a/src/CustomString/widget/CustomString.js +++ b/src/CustomString/widget/CustomString.js @@ -86,7 +86,9 @@ define([ _processSourceMFCallback: function (callback, returnedString) { logger.debug(this.id + "._processSourceMFCallback"); - html.set(this.customString, this.checkString(returnedString, this.renderHTML)); + if (this.customString) { + html.set(this.customString, this.checkString(returnedString, this.renderHTML)); + } this._executeCallback(callback, "_processSourceMFCallback"); }, diff --git a/src/package.xml b/src/package.xml index 41b81bb..14a37ad 100644 --- a/src/package.xml +++ b/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/test/widgets/CustomString.mpk b/test/widgets/CustomString.mpk index 7aa86062527da26166081807e0c3a09aa39b8435..b4b9562aa7fee7f85f497ef0d77f8abacba98781 100644 GIT binary patch delta 1563 zcmV+$2ITqZFX}IlH3-Ueg-l_Glt+<08GpYHf-n$=cb}rU-JUWSV+sr;Zo2pc1P*MZ zErCOLd>j7+FzR5pYwy1Am!66TQ;91zt#&qqwOoN9o4H)uGK7wc3=WRPiBg@kR6? z;2b*vsM+`UrM(ss-2k&00d@)m{858UlamWB4Wf00Oa?KtfuRHd0C$tl3oL(2Z{s!) zz6Z#EnCP&OQB_8-PSYZrZXZB{T{J;^FoHmjvBiWERfJC?P(EpQ-Z@M3@4;6b+Su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