Index: graphspell-js/spellchecker.js ================================================================== --- graphspell-js/spellchecker.js +++ graphspell-js/spellchecker.js @@ -109,25 +109,19 @@ this.bPersonalDic = Boolean(this.oPersonalDic); return this.bPersonalDic; } activateExtendedDictionary () { - if (this.oExtendedDic) { - this.bExtendedDic = true; - } + this.bExtendedDic = Boolean(this.oExtendedDic); } activateCommunityDictionary () { - if (this.oCommunityDic) { - this.bCommunityDic = true; - } + this.bCommunityDic = Boolean(this.oCommunityDic); } activatePersonalDictionary () { - if (this.oPersonalDic) { - this.bPersonalDic = true; - } + this.bPersonalDic = Boolean(this.oPersonalDic); } deactivateExtendedDictionary () { this.bExtendedDic = false; } Index: graphspell/spellchecker.py ================================================================== --- graphspell/spellchecker.py +++ graphspell/spellchecker.py @@ -80,20 +80,17 @@ self.oPersonalDic = self._loadDictionary(source) self.bPersonalDic = bool(self.oPersonalDic) return self.bPersonalDic def activateExtendedDictionary (self): - if self.oExtendedDic: - self.bExtendedDic = True + self.bExtendedDic = bool(self.oExtendedDic) def activateCommunityDictionary (self): - if self.oCommunityDic: - self.bCommunityDic = True + self.bCommunityDic = bool(self.oCommunityDic) def activatePersonalDictionary (self): - if self.oPersonalDic: - self.bPersonalDic = True + self.bPersonalDic = bool(self.oPersonalDic) def deactivateExtendedDictionary (self): self.bExtendedDic = False def deactivateCommunityDictionary (self):