From f07ec21a07462bcea77d24b9d39110f7d00000a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Sat, 26 Oct 2019 09:34:51 +0200 Subject: [PATCH] [FIX] playground: add missing ; Because of that missing ";", the playground application tried to inject this: window.TEMPLATES = `...` instead of this: window.TEMPLATES = `...`; So, when the following line started with a (, then the javascript code was interpreted as a function call. And it could happen, because some people like to use the IIFE syntax to have some contained code. --- tools/playground/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/playground/app.js b/tools/playground/app.js index 1e48fed6..07e9b22b 100644 --- a/tools/playground/app.js +++ b/tools/playground/app.js @@ -90,7 +90,7 @@ function makeCodeIframe(js, css, xml, errorHandler) { owlScript.addEventListener("load", () => { const script = doc.createElement("script"); script.type = "text/javascript"; - const content = `owl.__info__.mode = 'dev';\nwindow.TEMPLATES = \`${sanitizedXML}\`\n${js}`; + const content = `owl.__info__.mode = 'dev';\nwindow.TEMPLATES = \`${sanitizedXML}\`;\n${js}`; script.innerHTML = content; iframe.contentWindow.addEventListener("error", errorHandler); iframe.contentWindow.addEventListener("unhandledrejection", errorHandler);