Don't use class names in comparisons

This commit is contained in:
Andrew Miner
2015-02-19 08:45:36 -08:00
parent d05167ca02
commit 96bb226492
+1 -1
View File
@@ -63,7 +63,7 @@ module.exports = class ItemSlug
return ItemSlug.compare this, that
matches: (slug, options={exact:false})->
return false unless slug?.constructor?.name is 'ItemSlug'
return false unless typeof(slug.matches) is 'function'
if slug.isQualified and this.isQualified
return slug.qualified is this.qualified