From f5f787801d27003aa949ccaac9dbcfb7f75b4530 Mon Sep 17 00:00:00 2001 From: Faraz Yashar Date: Mon, 30 Dec 2013 15:08:12 -0500 Subject: [PATCH] Fix improper test for undefined --- assets/format.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/format.js b/assets/format.js index 6843c3e..d62ed89 100644 --- a/assets/format.js +++ b/assets/format.js @@ -28,7 +28,7 @@ function format() { options.autosemicolon = true; } - if (typeof editor === undefined) { + if (typeof editor === 'undefined') { raw = document.getElementById('raw').value; } else { raw = editor.getValue(); @@ -36,7 +36,7 @@ function format() { beautified = cssbeautify(raw, options); - if (typeof viewer === undefined) { + if (typeof viewer === 'undefined') { document.getElementById('beautified').value = beautified; } else { viewer.setValue(beautified);