undefined cached checks.

Part of #185. Should fix #162 & #163.
This commit is contained in:
oleg8sh 2014-08-08 23:11:45 +04:00
parent e094292718
commit f643636eb3

View file

@ -33,7 +33,7 @@ Mithril = m = new function app(window, undefined) {
if (data.subtree === "retain") return cached
var cachedType = type.call(cached), dataType = type.call(data)
if (cachedType != dataType) {
if (cached === undefined || cached === null || cachedType != dataType) {
if (cached !== null && cached !== undefined) {
if (parentCache && parentCache.nodes) {
var offset = index - parentIndex