From 5303e70fde7aa115af4727b52dc8cb728373d001 Mon Sep 17 00:00:00 2001 From: Jackson Nowotny Date: Tue, 29 Aug 2017 10:30:45 -0500 Subject: [PATCH] fixing merge conflicts --- docs/change-log.md | 2 +- render/render.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/change-log.md b/docs/change-log.md index 05c1e601..5b30bb0a 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -28,7 +28,6 @@ - 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. -- Fix IE11 active element is null causing render function to throw error. --- @@ -38,6 +37,7 @@ - core: don't call `onremove` on the children of components that return null from the view [#1921](https://github.com/MithrilJS/mithril.js/issues/1921) [octavore](https://github.com/octavore) ([#1922](https://github.com/MithrilJS/mithril.js/pull/1922)) - hypertext: correct handling of shared attributes object passed to `m()`. Will copy attributes when it's necessary [#1941](https://github.com/MithrilJS/mithril.js/issues/1941) [s-ilya](https://github.com/s-ilya) ([#1942](https://github.com/MithrilJS/mithril.js/pull/1942)) +- Fix IE bug where active element is null causing render function to throw error. ([1943](https://github.com/MithrilJS/mithril.js/pull/1943)) --- diff --git a/render/render.js b/render/render.js index c733f9fc..cc6afd51 100644 --- a/render/render.js +++ b/render/render.js @@ -631,7 +631,7 @@ module.exports = function($window) { dom.vnodes = vnodes for (var i = 0; i < hooks.length; i++) hooks[i]() // document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement - if (active !== null && $doc.activeElement !== active) active.focus() + if (active != null && $doc.activeElement !== active) active.focus() } return {render: render, setEventCallback: setEventCallback}