#512 revert #382 due to diff engine regression

This commit is contained in:
Leo Horie 2015-03-23 22:23:27 -04:00
parent b0f85a7131
commit 5114499958
2 changed files with 3 additions and 1 deletions

View file

@ -18,6 +18,7 @@
- fix dom element ownership bug when mixing keyed elements and third party plugin elements [#463](https://github.com/lhorie/mithril.js/issues/463)
- fix edge case in flatten algorithm [#448](https://github.com/lhorie/mithril.js/issues/448)
- prevent unnecessary DOM move operation when mixing keyed and unkeyed elements [#398](https://github.com/lhorie/mithril.js/issues/398)
- revert [#382](https://github.com/lhorie/mithril.js/issues/382) due to diff regression [#512](https://github.com/lhorie/mithril.js/issues/512)
---

View file

@ -61,7 +61,8 @@ var m = (function app(window, undefined) {
for (var attrName in attrs) {
if (attrName === classAttrName) {
if (attrs[attrName] !== "") cell.attrs[attrName] = (cell.attrs[attrName] || "") + " " + attrs[attrName];
var className = cell.attrs[attrName]
cell.attrs[attrName] = (className && attrs[attrName] ? className + " " : className || "") + attrs[attrName];
}
else cell.attrs[attrName] = attrs[attrName]
}