From 919f443099c72604a8c76a2ac5641f72b7ff6755 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Mon, 29 Jun 2015 09:35:04 -0400 Subject: [PATCH] simplify condition --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index b267ca45..e7f084a0 100644 --- a/mithril.js +++ b/mithril.js @@ -248,7 +248,7 @@ var m = (function app(window, undefined) { var key = data && data.attrs && data.attrs.key; data = (pendingRequests == 0 || forcing) || (cached && cached.controllers && cached.controllers.indexOf(controller) > -1) ? data.view(controller) : {tag: "placeholder"}; if (data.subtree === "retain") return cached; - if (typeof key !== 'undefined' && key !== null) { + if (key != null) { if (!data.attrs) data.attrs = {}; data.attrs.key = key; }