don't throw error when using console.log in firefox

This commit is contained in:
Leo Horie 2014-12-09 11:20:40 -05:00
parent f3076367ee
commit cbdbdd7c60
2 changed files with 6 additions and 1 deletions

View file

@ -91,7 +91,7 @@ var m = (function app(window, undefined) {
//there's logic that relies on the assumption that null and undefined data are equivalent to empty strings
//- this prevents lifecycle surprises from procedural helpers that mix implicit and explicit return statements (e.g. function foo() {if (cond) return m("div")}
//- it simplifies diffing code
if (data == null) data = "";
if (data == null || data.toString() == null) data = "";
if (data.subtree === "retain") return cached;
var cachedType = type.call(cached), dataType = type.call(data);
if (cached == null || cachedType !== dataType) {