|
@@ -751,13 +751,12 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
|
|
|
|
|
|
|
|
st.assert = function(shouldBeBoolean) {
|
|
st.assert = function(shouldBeBoolean) {
|
|
-
|
|
|
|
if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
|
|
if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
|
|
- else if (shouldBeBoolean != null && typeof shouldBeBoolean === "object" && shouldBeBoolean.klass === globals.Boolean) {
|
|
+ else if (shouldBeBoolean != null && typeof shouldBeBoolean === "object") {
|
|
- return shouldBeBoolean == true;
|
|
+ shouldBeBoolean = shouldBeBoolean.valueOf();
|
|
- } else {
|
|
+ if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
|
|
- globals.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
|
|
|
|
}
|
|
}
|
|
|
|
+ globals.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|