Skip to content

Commit

Permalink
Don't add transformations when server rendering (#17)
Browse files Browse the repository at this point in the history
They don't work without a DOM!
  • Loading branch information
toddself authored Sep 26, 2017
1 parent d7c4f18 commit 7644edc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions error-el.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ function ErrorEl (opts) {
}

ErrorEl.prototype._addTransition = function addTransition (transitionData) {
const keys = Object.keys(transitionData)
for (let i = 0, len = keys.length; i < len; i++) {
const key = keys[i]
const td = transitionData[key]
const val = typeof td === 'function' ? td.call(this) : td
this.$el.style[key] = val
if (typeof window !== 'undefined') {
const keys = Object.keys(transitionData)
for (let i = 0, len = keys.length; i < len; i++) {
const key = keys[i]
const td = transitionData[key]
const val = typeof td === 'function' ? td.call(this) : td
this.$el.style[key] = val
}
}
}

Expand Down

0 comments on commit 7644edc

Please sign in to comment.