pid / speakingurl

Generate a slug – transliteration with a lot of options
http://pid.github.io/speakingurl/
BSD 3-Clause "New" or "Revised" License
1.12k stars 84 forks source link

Incorrect type checking when looking for Node/AMD #62

Closed jdiprizio closed 9 years ago

jdiprizio commented 9 years ago

Line 1363 and 1369, you're comparing a typeof against the undefined property instead of 'undefined' as a string.

In a browser, module.exports check is therefore executed resulting in a ReferenceError exception.

pid commented 9 years ago

ohhh yeahh, this must happen after some refactoring and injecting undefined (function (root, undefined) :+1: will release v5.0.1