From 661307c02ecfd812ea5cea600d800c911ee85fdf Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Thu, 26 Jun 2014 07:16:19 -0400 Subject: [PATCH] fix subtree directive bug that made first input copy value of current active one, if inside loop --- docs/change-log.md | 14 +++++++++++++- mithril.js | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/change-log.md b/docs/change-log.md index a4fb7986..4fc58b58 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,6 +1,18 @@ ## Change Log -[v0.1.16](/mithril/archive/v0.1.6) - maintenance +[v0.1.17](/mithril/archive/v0.1.17) - maintenance + +### News: + +- config contexts can now have an `onunload` property for clean up tasks after elements are detached from the document + +### Bug Fixes: + +- fixed a subtree directive bug that happened in inputs inside loops + +--- + +[v0.1.16](/mithril/archive/v0.1.16) - maintenance ### News: diff --git a/mithril.js b/mithril.js index 986320d3..2922dee7 100644 --- a/mithril.js +++ b/mithril.js @@ -34,7 +34,7 @@ Mithril = m = new function app(window) { } function build(parentElement, parentTag, parentCache, parentIndex, data, cached, shouldReattach, index, editable, namespace, configs) { if (data === null || data === undefined) data = "" - if (data.subtree === "retain") return + if (data.subtree === "retain") return cached var cachedType = type.call(cached), dataType = type.call(data) if (cachedType != dataType) {