You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed an uncaught error when upgrading an app from 2.0.0-beta1 to canary: pattern.indexOf is not a function. I found that it came from https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/expand_properties.js#L37-L39 which has a docblock that specifies that pattern is a string but also checks if pattern is of type string after calling indexOf on it. All tests appear to test with a string.
So anyway, while I was debugging I edited the Ember source in my app and moved the pattern.indexOf(' ') call inside the conditional and then received Ember.observer called without a function. Seems reasonable, something must be calling observer wrong. However while I was looking for the cause (I only have about 3 observers in this app, all correct) I restarted ember serve and the error went away. I'm unable to replicate it now.
So, I'm happy to submit a patch to make the behavior more user friendly if that's what is needed. Alternatively maybe someone else will hit the same error and can add details to this issue.
The text was updated successfully, but these errors were encountered:
@gdub22@teddyzeenny@rwjblue unfortunately ember inspector throws the same error because it is using this form of observer(fn, key). It was fixed with emberjs/ember-inspector@3cb4460 but the released version I have throws this error.
I noticed an uncaught error when upgrading an app from 2.0.0-beta1 to canary:
pattern.indexOf is not a function
. I found that it came from https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/expand_properties.js#L37-L39 which has a docblock that specifies thatpattern
is a string but also checks ifpattern
is of type string after callingindexOf
on it. All tests appear to test with a string.So anyway, while I was debugging I edited the Ember source in my app and moved the
pattern.indexOf(' ')
call inside the conditional and then receivedEmber.observer called without a function
. Seems reasonable, something must be callingobserver
wrong. However while I was looking for the cause (I only have about 3 observers in this app, all correct) I restartedember serve
and the error went away. I'm unable to replicate it now.So, I'm happy to submit a patch to make the behavior more user friendly if that's what is needed. Alternatively maybe someone else will hit the same error and can add details to this issue.
The text was updated successfully, but these errors were encountered: