From ef4f591a1d6c348d6236f39a061071457ec192e4 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 1 Feb 2011 09:08:17 +0000 Subject: - Unify typeof and undefined usage --- program/js/googiespell.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'program/js/googiespell.js') diff --git a/program/js/googiespell.js b/program/js/googiespell.js index 428d7f0dc..22716c457 100644 --- a/program/js/googiespell.js +++ b/program/js/googiespell.js @@ -91,7 +91,7 @@ function GoogieSpell(img_dir, server_url) { this.decorateTextarea = function(id) { - this.text_area = typeof(id) == 'string' ? document.getElementById(id) : id; + this.text_area = typeof id === 'string' ? document.getElementById(id) : id; if (this.text_area) { if (!this.spell_container && this.decoration) { @@ -120,7 +120,7 @@ this.decorateTextarea = function(id) { // API Functions (the ones that you can call) ///// this.setSpellContainer = function(id) { - this.spell_container = typeof(id) == 'string' ? document.getElementById(id) : id; + this.spell_container = typeof id === 'string' ? document.getElementById(id) : id; }; this.setLanguages = function(lang_dict) { @@ -931,7 +931,7 @@ this.checkSpellingState = function(fire) { // Misc. functions ///// this.isDefined = function(o) { - return (o != 'undefined' && o != null) + return (o !== undefined && o !== null) }; this.errorFixed = function() { -- cgit v1.2.3