Merge pull request #692 from pelonpelon/patch-15
mithril.js: fix if clause that expects truthy value. issue: #689
This commit is contained in:
commit
dbc3bc81e4
1 changed files with 1 additions and 1 deletions
|
|
@ -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 (key) {
|
||||
if (typeof key !== 'undefined' && key !== null) {
|
||||
if (!data.attrs) data.attrs = {};
|
||||
data.attrs.key = key;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue