Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Conversation

@Gusi
Copy link
Contributor

@Gusi Gusi commented Jan 17, 2017

Boolean variable to allow bootstrap decorator to monitor when the input is showing an error message.
#142

@ghiscoding
Copy link
Owner

is there a particular reason why you set it to undefined instead of false when not showing?

@Gusi
Copy link
Contributor Author

Gusi commented Jan 18, 2017

I think that setting to undefined is better because as the value is not initialized at the constructor or so, the only possible values are "true" and "undefined". If you set to false, during the object lifecycle the possible values would be "true", "false" and "undefined" (before the updateErrorMsg is called)

But at the end, it is a matter of personal preference :)

@ghiscoding
Copy link
Owner

Do you have to do a check if that property exist before looking at the true flag? I mean, do you need to do something like self.ctrl.hasOwnProperty('errorMessageVisible') because looking at the boolean value?

@ghiscoding ghiscoding merged commit 6359a10 into ghiscoding:master Jan 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants