Make unrender idempotent

This commit is contained in:
fragosti 2019-03-22 15:02:12 -07:00
parent 50f5002b71
commit 6b8e40fdc9
2 changed files with 78 additions and 3 deletions

View File

@ -73,7 +73,7 @@ export const unrender = () => {
}
ReactDOM.unmountComponentAtNode(injectedDiv);
if (parentElement) {
if (parentElement && parentElement.contains(injectedDiv)) {
parentElement.removeChild(injectedDiv);
}
};

View File

@ -489,6 +489,23 @@
ethers "~4.0.4"
lodash "^4.17.11"
"@0x/contracts-asset-proxy@^1.0.2":
version "1.0.9"
resolved "https://registry.npmjs.org/@0x/contracts-asset-proxy/-/contracts-asset-proxy-1.0.9.tgz#3a48e64b93ddc642834bde1bd09cdd84ca688a2b"
integrity sha512-AnKE0eDejl3G4xRzwOa2S2usiAoRvyV3lU/sOhwkG53KC6RHQGu9g50zcLHMHmTl9I088eEa423QwbeBxgmtcQ==
dependencies:
"@0x/base-contract" "^5.0.2"
"@0x/contracts-erc20" "^1.0.9"
"@0x/contracts-erc721" "^1.0.9"
"@0x/contracts-utils" "2.0.1"
"@0x/order-utils" "^7.0.2"
"@0x/types" "^2.1.1"
"@0x/typescript-typings" "^4.1.0"
"@0x/utils" "^4.2.2"
"@0x/web3-wrapper" "^6.0.2"
ethereum-types "^2.1.0"
lodash "^4.17.11"
"@0x/contracts-erc20@1.0.8":
version "1.0.8"
resolved "https://registry.npmjs.org/@0x/contracts-erc20/-/contracts-erc20-1.0.8.tgz#882f3acf1a44148800d9bef692aa377627df9ace"
@ -503,6 +520,21 @@
ethereum-types "^2.1.0"
lodash "^4.17.11"
"@0x/contracts-erc20@^1.0.2", "@0x/contracts-erc20@^1.0.9":
version "1.0.9"
resolved "https://registry.npmjs.org/@0x/contracts-erc20/-/contracts-erc20-1.0.9.tgz#366ce8222dcae5ade0ea7ca95332416a080f6abf"
integrity sha512-CJwEWrGf0tvpnraEW+TPTjpMcwj9yDem1xVbER0qV49RRZupasVIcQmaZi4ZUpZqo4X67ZOx8uijgLXFDB9NDw==
dependencies:
"@0x/base-contract" "^5.0.2"
"@0x/contracts-exchange-libs" "1.0.2"
"@0x/contracts-utils" "2.0.1"
"@0x/types" "^2.1.1"
"@0x/typescript-typings" "^4.1.0"
"@0x/utils" "^4.2.2"
"@0x/web3-wrapper" "^6.0.2"
ethereum-types "^2.1.0"
lodash "^4.17.11"
"@0x/contracts-erc721@1.0.8":
version "1.0.8"
resolved "https://registry.npmjs.org/@0x/contracts-erc721/-/contracts-erc721-1.0.8.tgz#d3746c26eec57662654557121601b5bb81085637"
@ -516,6 +548,20 @@
ethereum-types "^2.1.0"
lodash "^4.17.11"
"@0x/contracts-erc721@^1.0.2", "@0x/contracts-erc721@^1.0.9":
version "1.0.9"
resolved "https://registry.npmjs.org/@0x/contracts-erc721/-/contracts-erc721-1.0.9.tgz#3991858a3bf5a80dcd6e5fd65e938f8adc3b347c"
integrity sha512-Q4T93VEUChyLAz1bNRLidCtJ2/bfU1vsbeZGQeCrmm/Lcjaqm72B44SpLAiLBdTpyTfWT5gfvK+uQr1BtXTUVQ==
dependencies:
"@0x/base-contract" "^5.0.2"
"@0x/contracts-utils" "2.0.1"
"@0x/types" "^2.1.1"
"@0x/typescript-typings" "^4.1.0"
"@0x/utils" "^4.2.2"
"@0x/web3-wrapper" "^6.0.2"
ethereum-types "^2.1.0"
lodash "^4.17.11"
"@0x/contracts-exchange-libs@1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@0x/contracts-exchange-libs/-/contracts-exchange-libs-1.0.2.tgz#0682c01cdb3e36100bda0ffbdf9badb5b8a01fc4"
@ -530,6 +576,21 @@
ethereum-types "^2.0.0"
lodash "^4.17.5"
"@0x/contracts-exchange-libs@^1.0.2":
version "1.1.3"
resolved "https://registry.npmjs.org/@0x/contracts-exchange-libs/-/contracts-exchange-libs-1.1.3.tgz#dc9429e9c5fc750e9f5006e5ad53ebd7aa577c28"
integrity sha512-M2kAMN6SO78sMyCuJLjen10CqoUNkeCFD2T8MYMpMcWWWFXTlyyeJgPllZf/ySlXSBziyJUcCRZjdwbZfF7AYQ==
dependencies:
"@0x/base-contract" "^5.0.2"
"@0x/contracts-utils" "^2.0.8"
"@0x/order-utils" "^7.0.2"
"@0x/types" "^2.1.1"
"@0x/typescript-typings" "^4.1.0"
"@0x/utils" "^4.2.2"
"@0x/web3-wrapper" "^6.0.2"
ethereum-types "^2.1.0"
lodash "^4.17.11"
"@0x/contracts-exchange@1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@0x/contracts-exchange/-/contracts-exchange-1.0.2.tgz#4c02378b26a7bf6324e16a41f2851c43fed82c63"
@ -565,6 +626,22 @@
ethereumjs-util "^5.1.1"
lodash "^4.17.5"
"@0x/contracts-utils@^2.0.1", "@0x/contracts-utils@^2.0.8":
version "2.0.8"
resolved "https://registry.npmjs.org/@0x/contracts-utils/-/contracts-utils-2.0.8.tgz#b6a3775296e04c7ca9ebea7eae56fda48a43239d"
integrity sha512-5I1wq4ImjsIgjBNDl5F6qwJMDc6sm52vVGIxz+v9N6hUcJwaxa/SYeZ4EA5BpFdHK73xtvNe4CeRK2+g9Pt5UA==
dependencies:
"@0x/base-contract" "^5.0.2"
"@0x/order-utils" "^7.0.2"
"@0x/types" "^2.1.1"
"@0x/typescript-typings" "^4.1.0"
"@0x/utils" "^4.2.2"
"@0x/web3-wrapper" "^6.0.2"
bn.js "^4.11.8"
ethereum-types "^2.1.0"
ethereumjs-util "^5.1.1"
lodash "^4.17.11"
"@0x/order-utils@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@0x/order-utils/-/order-utils-5.0.0.tgz#7f43e0310ace31738895881501c8dda9c3a3aefa"
@ -13605,8 +13682,6 @@ react-highlight@0xproject/react-highlight#react-peer-deps:
dependencies:
highlight.js "^9.11.0"
highlightjs-solidity "^1.0.5"
react "^16.5.2"
react-dom "^16.5.2"
react-hot-loader@^4.3.3:
version "4.3.4"