From f1915d3b7cc15bbdc8abcf2751248a0fea631e27 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 12 Feb 2016 16:21:17 +0100 Subject: [PATCH] fix jshint complaints in pad directory --- www/pad/main.js | 8 ++++---- www/pad/realtime-wysiwyg.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/pad/main.js b/www/pad/main.js index 668ba7ded..6925d4150 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -10,7 +10,7 @@ define([ var ifrw = $('#pad-iframe')[0].contentWindow; var Ckeditor = ifrw.CKEDITOR; - var andThen = function () { + var andThen = function (Ckeditor) { $(window).on('hashchange', function() { window.location.reload(); }); @@ -45,9 +45,9 @@ define([ var interval = 100; var first = function () { - // FIXME assignment in conditional - if (Ckeditor = ifrw.CKEDITOR) { - andThen(); + Ckeditor = ifrw.CKEDITOR; + if (Ckeditor) { + andThen(Ckeditor); } else { console.log("Ckeditor was not defined. Trying again in %sms",interval); setTimeout(first, interval); diff --git a/www/pad/realtime-wysiwyg.js b/www/pad/realtime-wysiwyg.js index 72e11cc88..63c9052af 100644 --- a/www/pad/realtime-wysiwyg.js +++ b/www/pad/realtime-wysiwyg.js @@ -210,7 +210,7 @@ window.ErrorBox = ErrorBox; } return x; } - }; + } throw new Error(); }); };