Skip to content

Commit

Permalink
Use core.isServerSide for checking environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Frampton authored and Robert-Frampton committed Oct 3, 2017
1 parent 59a922d commit c2a316d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/metal-incremental-dom/src/render/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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_ = [];
Expand All @@ -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) {
Expand Down

0 comments on commit c2a316d

Please sign in to comment.