Index: graphspell-js/dawg.js ================================================================== --- graphspell-js/dawg.js +++ graphspell-js/dawg.js @@ -473,11 +473,11 @@ this.addr = 0; // address in the binary dictionary } __str__ () { // Caution! this function is used for hashing and comparison! - let sFinalChar = (self.final) ? "1" : "0"; + let sFinalChar = (this.final) ? "1" : "0"; let l = [sFinalChar]; for (let [key, node] of this.arcs.entries()) { l.push(key.toString()); l.push(node.i.toString()); }