From 6efde2655e24efdaf8ab0b4d0c364f0ed4bed656 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Tue, 22 Jan 2019 22:23:50 +0200 Subject: [PATCH] typescript(translucid): Fixed 'UnhandledPromiseRejectionWarning: TypeError: Assignment to constant variable.' Signed-off-by: prescientmoon --- typescript/translucid/Translucid.js | 2 +- typescript/translucid/Translucid.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/translucid/Translucid.js b/typescript/translucid/Translucid.js index 5ea99d6..c58be4a 100644 --- a/typescript/translucid/Translucid.js +++ b/typescript/translucid/Translucid.js @@ -25,7 +25,7 @@ class Translucid { const object = JSON.parse(json); for (let i in object) { const classes = object[i].classes || []; - const sendFiles = object[i].sendFiles; + let sendFiles = object[i].sendFiles; if (sendFiles != false) sendFiles = true; this.bind(i, object[i].file, classes, sendFiles); diff --git a/typescript/translucid/Translucid.ts b/typescript/translucid/Translucid.ts index 2cb5110..2221a41 100644 --- a/typescript/translucid/Translucid.ts +++ b/typescript/translucid/Translucid.ts @@ -30,7 +30,7 @@ class Translucid { for (let i in object){ const classes = object[i].classes || []; - const sendFiles = object[i].sendFiles; + let sendFiles = object[i].sendFiles; if (sendFiles != false) sendFiles = true; this.bind(i,object[i].file,classes,sendFiles); }