fix IE null ref exception

This commit is contained in:
Leo Horie 2014-10-03 13:31:02 -04:00
parent 35d328f416
commit 50173f0e74
4 changed files with 15 additions and 8 deletions

View file

@ -439,7 +439,8 @@ Mithril = m = new function app(window, undefined) {
}
m.prop = function (store) {
if ((isObj(store) || isFn(store)) && store !== null && isFn(store.then)) {
//note: using non-strict equality check here because we're checking if store is null OR undefined
if ((isObj(store) || isFn(store)) && store != null && isFn(store.then)) {
return propify(store)
}