Skip to content

Commit

Permalink
fix object assign plugin lookup (software-mansion#958)
Browse files Browse the repository at this point in the history
* fix object assign plugin lookup

* add object assign package
  • Loading branch information
karol-bisztyga authored Jul 9, 2020
1 parent 69a0be0 commit 9104c1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
},
"homepage": "https://github.com/software-mansion/react-native-reanimated#readme",
"dependencies": {
"@babel/plugin-transform-object-assign": "^7.10.4",
"fbjs": "^1.0.0",
"string-hash-64": "^1.0.3"
},
Expand Down
6 changes: 3 additions & 3 deletions plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function processWorklets(t, path, processor) {
}

const PLUGIN_BLACKLIST_NAMES = [
'metro-react-native-babel-preset/node_modules/@babel/plugin-transform-object-assign',
'@babel/plugin-transform-object-assign',
];

const PLUGIN_BLACKLIST = PLUGIN_BLACKLIST_NAMES.map((pluginName) => {
Expand All @@ -319,7 +319,7 @@ function removePluginsFromBlacklist(plugins) {
return;
}

let toRemove = [];
const toRemove = [];
for (let i = 0; i < plugins.length; i++) {
if (
JSON.stringify(Object.keys(plugins[i].visitor)) !=
Expand All @@ -328,7 +328,7 @@ function removePluginsFromBlacklist(plugins) {
continue;
}
let areEqual = true;
for (let key of Object.keys(blacklistedPlugin.visitor)) {
for (const key of Object.keys(blacklistedPlugin.visitor)) {
if (
blacklistedPlugin.visitor[key].toString() !=
plugins[i].visitor[key].toString()
Expand Down

0 comments on commit 9104c1c

Please sign in to comment.