From aa9eeb80e733abc66d23c31fb034876fdb98f034 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Fri, 14 Nov 2014 14:22:13 -0800 Subject: [PATCH] fix(change_detection/lexer): support production mode The Lexer uses the global `assert` function of Dart, which is not yet available in JavaScript. Later on, all `assert` statements should be automatically removed by Traceur. --- modules/facade/src/lang.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/facade/src/lang.es6 b/modules/facade/src/lang.es6 index 9872c3f35e..62c66aef1b 100644 --- a/modules/facade/src/lang.es6 +++ b/modules/facade/src/lang.es6 @@ -3,6 +3,10 @@ import {assert} from 'rtts_assert/rtts_assert'; export var Type = Function; export var Math = window.Math; +// global assert support, as Dart has it... +// TODO: `assert` calls need to be removed in production code! +window.assert = assert; + export class FIELD { constructor(definition) { this.definition = definition;