| Index: lib/runtime/dart/_js_primitives.js
|
| diff --git a/lib/runtime/dart/_js_primitives.js b/lib/runtime/dart/_js_primitives.js
|
| index ecda66647d271315f9f6dc4ecbf9846750ef0a6c..8c6da506cb8d0c5f9f4fa87a30e12cb0cd1fcdae 100644
|
| --- a/lib/runtime/dart/_js_primitives.js
|
| +++ b/lib/runtime/dart/_js_primitives.js
|
| @@ -6,18 +6,18 @@ dart_library.library('dart/_js_primitives', null, /* Imports */[
|
| 'use strict';
|
| let dartx = dart.dartx;
|
| function printString(string) {
|
| - if (typeof dartPrint == "function") {
|
| + if (dart.notNull(dart.as(typeof dartPrint == "function", core.bool))) {
|
| dartPrint(string);
|
| return;
|
| }
|
| - if (typeof console == "object" && typeof console.log != "undefined") {
|
| + if (dart.notNull(dart.as(typeof console == "object", core.bool)) && dart.notNull(dart.as(typeof console.log != "undefined", core.bool))) {
|
| console.log(string);
|
| return;
|
| }
|
| - if (typeof window == "object") {
|
| + if (dart.notNull(dart.as(typeof window == "object", core.bool))) {
|
| return;
|
| }
|
| - if (typeof print == "function") {
|
| + if (dart.notNull(dart.as(typeof print == "function", core.bool))) {
|
| print(string);
|
| return;
|
| }
|
|
|