From 0a1b30416f45b0b1b646fd7d690f55bae6d18dcc Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 13 Dec 2021 10:20:04 +0100 Subject: [PATCH] button: safe script string search --- src/client/widgets/basics/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/widgets/basics/button.js b/src/client/widgets/basics/button.js index 3d0f4edb..1ea3beb7 100644 --- a/src/client/widgets/basics/button.js +++ b/src/client/widgets/basics/button.js @@ -64,7 +64,7 @@ class Button extends Widget { this.pulse = null this.buttonSize = [100, 100] - this.exposeTouchCoords = this.getProp('script').includes('touchCoords') + this.exposeTouchCoords = String(this.getProp('script')).includes('touchCoords') this.parsersLocalScope.touchCoords = [0.5, 0.5] if (this.exposeTouchCoords) { this.on('resize', (e)=>{