From 9297496a5e2f8ddb39b8071366b88446f851073a Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 1 Nov 2017 16:47:43 -0400 Subject: [PATCH] change instance of adding loopProtect to this.jsPreprocess --- client/modules/IDE/components/PreviewFrame.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 594e5bfd..6f28cc99 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -158,12 +158,12 @@ class PreviewFrame extends React.Component { const scriptsInHTML = sketchDoc.getElementsByTagName('script'); const scriptsInHTMLArray = Array.prototype.slice.call(scriptsInHTML); scriptsInHTMLArray.forEach((script) => { - script.innerHTML = loopProtect(script.innerHTML); // eslint-disable-line + script.innerHTML = this.jsPreprocess(script.innerHTML); // eslint-disable-line }); } - jsPreprocess(sketchDoc) { - let newContent = sketchDoc; + jsPreprocess(jsText) { + let newContent = jsText; // check the code for js errors before sending it to strip comments // or loops. JSHINT(newContent);