| Index: lib/compiler/implementation/lib/js_helper.dart
|
| diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
|
| index 7fe30c955972365a8b45593551be418836ff75a0..b969c9d4e621241ded0e0b8e6ca8b7b19023fd1e 100644
|
| --- a/lib/compiler/implementation/lib/js_helper.dart
|
| +++ b/lib/compiler/implementation/lib/js_helper.dart
|
| @@ -815,7 +815,9 @@ unwrapException(ex) {
|
| message.endsWith('is undefined') ||
|
| message.endsWith('is null or undefined')) {
|
| return new NullPointerException();
|
| - } else if (message.endsWith('is not a function')) {
|
| + } else if (message.contains(' is not a function')) {
|
| + // x.foo is not a function
|
| + // 'undefined' is not a function (evaluating 'x.foo(1,2,3)')
|
| // TODO(kasperl): Compute the right name if possible.
|
| return new NoSuchMethodException('', '<unknown>', []);
|
| }
|
|
|