Index: pkg/dev_compiler/lib/js/es6/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/es6/dart_sdk.js b/pkg/dev_compiler/lib/js/es6/dart_sdk.js |
index c37bee4c3a8495984530e784063c21d5accb0401..5a1b9f8744c4d0814e1dd355d9ce0efdeacc2003 100644 |
--- a/pkg/dev_compiler/lib/js/es6/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/es6/dart_sdk.js |
@@ -1019,6 +1019,7 @@ dart.registerExtension = function(jsType, dartExtType) { |
if (!jsType) return; |
let extProto = dartExtType.prototype; |
let jsProto = jsType.prototype; |
+ if (!jsProto) return; |
jsProto[dart._extensionType] = dartExtType; |
dart._installProperties(jsProto, extProto); |
let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, dart._methodSig).get; |
@@ -1759,7 +1760,7 @@ dart.stackTrace = function(exception) { |
}; |
dart.nullSafe = function(obj, ...callbacks) { |
if (obj == null) return obj; |
- for (const callback of callbacks) { |
+ for (let callback of callbacks) { |
obj = callback(obj); |
if (obj == null) break; |
} |