Index: pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
index a4d975fbafe89f668c1b6de04db69c19ad4fb461..12926851c2cc94047b8b6a5dd130db148a2efdcf 100644 |
--- a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
@@ -1022,6 +1022,7 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
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; |
@@ -1762,7 +1763,7 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
}; |
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; |
} |