From c2a316dae2cd72efbb0230746bda81b1b38637ed Mon Sep 17 00:00:00 2001 From: Robert-Frampton Date: Tue, 3 Oct 2017 09:36:02 -0700 Subject: [PATCH] Use core.isServerSide for checking environment --- packages/metal-incremental-dom/src/render/patch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/metal-incremental-dom/src/render/patch.js b/packages/metal-incremental-dom/src/render/patch.js index 1490ee56..942e1557 100644 --- a/packages/metal-incremental-dom/src/render/patch.js +++ b/packages/metal-incremental-dom/src/render/patch.js @@ -2,7 +2,7 @@ import { append, exitDocument } from 'metal-dom'; import { getData } from '../data'; -import { isFunction } from 'metal'; +import { isServerSide } from 'metal'; import { render } from './render'; const patchingComponents_ = []; @@ -17,7 +17,7 @@ const patchingComponents_ = []; function buildParentIfNecessary_(element) { if (!element || !element.parentNode) { let parent = {}; - if (typeof document !== 'undefined' && isFunction(document.createElement)) { + if (!isServerSide()) { parent = document.createElement('div'); } if (element) {