Skip to content

Commit

Permalink
Polyfill Object.assign to create Internet Explorer compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
René Roth committed Jun 8, 2017
1 parent 7b07a1e commit e74e821
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"babel-preset-env": "^1.1.8",
"babelify": "^7.3.0",
"browserify": "^14.0.0",
"object-assign": "^4.1.1",
"raf": "^3.3.0",
"uglify-js": "^2.7.5"
}
Expand Down
3 changes: 2 additions & 1 deletion src/parallax.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import rqAnFr from 'raf'
import objectAssign from 'object-assign'

const helpers = {
propertyCache: {},
Expand Down Expand Up @@ -182,7 +183,7 @@ class Parallax {
}
}

Object.assign(this, DEFAULTS, data, options)
objectAssign(this, DEFAULTS, data, options)

if(!this.inputElement) {
this.inputElement = this.element
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2974,7 +2974,7 @@ object-assign@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"

object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"

Expand Down

0 comments on commit e74e821

Please sign in to comment.