-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Fix JS Quick Edit for projects that have a function named "hasOwnProperty" #2826
Comments
Comment by peterflynn I think this is basically plugging a hole in my earlier fix #2816 (sorry!). That patch made a similar It would also be good to augment the unit tests that #2816 added (https://github.com/adobe/brackets/pull/2816/files#L6R255 and https://github.com/adobe/brackets/pull/2816/files#L6R443 and https://github.com/adobe/brackets/pull/2816/files#L8R634) to cover this bug too. |
Comment by peterflynn I'd bet we have similar bugs with some of the other built-in Object properties (constructor, isPrototypeOf, valueOf, etc.)... worth trying to fix those here, or should we just do a spin-off bug? [Edit: or maybe not... I guess the original #2816 fix should in theory cover all cases except for hasOwnProperty() already] |
Comment by peterflynn One other thought: if we're using this hasOwnProperty.apply() trick in a few places, is it worth adding a utility fn for it? (CollectionUtils maybe?) |
Comment by peterflynn
|
Comment by gruehle
|
Comment by TomMalbran Hehe, JSHint doesn't like the |
Comment by gruehle Yep :-). This is one case where JSHint complained more than JSLInt. Changed to "hasProperty". |
Comment by TomMalbran It kind of makes sense, since we are fixing the problem of a project having a |
Comment by peterflynn Looks good! |
Issue by gruehle
Friday Mar 01, 2013 at 00:42 GMT
Originally opened as adobe/brackets#3004
Fixes #3002
If any files in your project define a function named
hasOwnProperty
, JS Quick Edit would throw an exception. (modernizr.js, which is included in the test files for phantom.js, defines ahasOwnProperty
function. This is the cause of bug #3002).@
peterflynn - since you've fixed several bugs in this area, would you mind taking a look?gruehle included the following code: https://github.com/adobe/brackets/pull/3004/commits
The text was updated successfully, but these errors were encountered: