From ae0b7915300881d8c5a685d8df36176416a70879 Mon Sep 17 00:00:00 2001 From: spacejack Date: Tue, 15 Aug 2017 15:53:23 -0400 Subject: [PATCH] Eleminate now-redundant if block. Add change-log notes. --- docs/change-log.md | 1 + render/render.js | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/change-log.md b/docs/change-log.md index 6ea8b86a..82686f0e 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -27,6 +27,7 @@ - API: `m.route.set()` causes all mount points to be redrawn ([#1592](https://github.com/MithrilJS/mithril.js/pull/1592)) - API: If a user sets the Content-Type header within a request's options, that value will be the entire header value rather than being appended to the default value ([#1924](https://github.com/MithrilJS/mithril.js/pull/1924)) +- API: Using style objects in hyperscript calls will now properly diff style properties from one render to another as opposed to re-writing all element style properties every render. --- diff --git a/render/render.js b/render/render.js index 40eca443..f6782297 100644 --- a/render/render.js +++ b/render/render.js @@ -572,11 +572,6 @@ module.exports = function($window) { for (var key in style) { element.style[key] = style[key] } - if (old != null && typeof old !== "string") { - for (var key in old) { - if (!(key in style)) element.style[key] = "" - } - } } }