Skip to content
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

Component named "watch" will give an error in Firefox #1756

Merged

Conversation

rniemeyer
Copy link
Member

Naming a component watch gives the following warning in Firefox 37:

Error: Component watch is already registered

I've created a gist of a barebones application which demonstrates this:
https://gist.github.com/msteward/c3a0298322277adae29e

This error is not thrown in Chrome or IE. For now I can choose another name but curious as to why this would fail in only Firefox?

@rniemeyer
Copy link
Member

Object's in Firefox have a watch property (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch). Our check to see if something is registered should do hasOwnProperty. I can create a PR for this change.

@rniemeyer rniemeyer force-pushed the 1756-hasOwnProperty-in-component-register-check branch from ff6a39b to 04596e8 Compare April 8, 2015 19:01
@rniemeyer
Copy link
Member

Code added to this issue.

@mbest mbest added this to the 3.4.0 milestone Apr 8, 2015
@mbest
Copy link
Member

mbest commented Apr 8, 2015

I made a small addition to the test. Otherwise looks great.

@rniemeyer
Copy link
Member

Looks good @mbest

SteveSanderson added a commit that referenced this pull request Apr 9, 2015
…nt-register-check

Component named "watch" will give an error in Firefox
@SteveSanderson SteveSanderson merged commit b1063ed into master Apr 9, 2015
@SteveSanderson
Copy link
Contributor

Excellent - thanks!

@mbest mbest deleted the 1756-hasOwnProperty-in-component-register-check branch May 25, 2015 00:52
@rniemeyer rniemeyer mentioned this pull request Aug 30, 2015
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants