simplify condition

This commit is contained in:
Leo Horie 2015-06-29 09:35:04 -04:00
parent dbc3bc81e4
commit 919f443099

View file

@ -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;
}