-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor fix to registry #86
Minor fix to registry #86
Conversation
Moved from #83 |
@@ -33,7 +37,7 @@ _.extend(TypeRegistry.prototype, { | |||
|
|||
// Remove an item from a given type registration | |||
unregister: function(type) { | |||
if (this.registeredTypes[type]) { | |||
if (_.has(this.registeredTypes,type)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pop in a space for formatting:
if (_.has(this.registeredTypes, type)) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, forgot to reformat document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no probs, once #88 lands, this kind of stuff will be picked up on grunt test
Great stuff @BorisKozo. Could you please squash this down to 1 commit? |
Changed hasOwnProperty to _.has Fixed issue where you could not register or unregister falsy items
dbb9baf
to
b1ae326
Compare
Special Sauce. Thanks @BorisKozo |
Fixing issue #77
Added some unit tests for the type registry
Fixed 2 typos in existing unit tests that were found due to this change