Skip to content

Commit

Permalink
Fix for React 15.2.0
Browse files Browse the repository at this point in the history
Fix after facebook/react#6748 broke the monkey-patching
  • Loading branch information
jscissr committed Jul 2, 2016
1 parent 3498020 commit 64b3866
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,13 @@ DOMPropertyOperations.setValueForAttribute = function (node, name, value) {
addPolymerScope(node)
}

var oldDeleteValueForProperty = DOMPropertyOperations.deleteValueForProperty
var oldDeleteValueForAttribute = DOMPropertyOperations.deleteValueForAttribute

DOMPropertyOperations.deleteValueForProperty = function (node, name) {
oldDeleteValueForProperty(node, name)
if (name === 'className') addPolymerScope(node)
DOMPropertyOperations.deleteValueForAttribute = function (node, name) {
if (name !== 'className') return oldDeleteValueForAttribute(node, name)

node.className = ''
addPolymerScope(node)
}

function addPolymerScope (node) {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
"devDependencies": {
"babel-preset-react": "^6.11.1",
"browserify": "^13.0.0",
"react": "^15.0.1",
"react-addons-test-utils": "^15.0.1",
"react-dom": "^15.0.1",
"react": "^15.2.0",
"react-addons-test-utils": "^15.2.0",
"react-dom": "^15.2.0",
"standard": "^7.0.1",
"tape": "^4.4.0",
"vulcanize": "^1.14.1",
"zuul": "^3.9.0"
},
"peerDependencies": {
"react": "^15.0.1"
"react": "^15.2.0"
},
"dependencies": {
"babel-preset-es2015": "^6.3.13",
Expand Down

0 comments on commit 64b3866

Please sign in to comment.