Skip to content

Commit

Permalink
avoid tcfapi collision (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextremp authored Mar 24, 2021
1 parent 1821c6a commit 563a36d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@
"@babel/register": "7.8.0",
"@babel/runtime": "7.8.0",
"@s-ui/lint": "3",
"@s-ui/test": "2",
"@s-ui/test": "4",
"babel-loader": "8.0.6",
"babel-plugin-transform-define": "2.0.0",
"babel-preset-sui": "3",
"chai": "4.2.0",
"clean-webpack-plugin": "3.0.0",
"codecov": "3.6.5",
"html-webpack-plugin": "4.0.4",
"jsdom": "16.2.2",
"jsdom": "16.5.1",
"jsdom-global": "3.0.2",
"mocha": "5.2.0",
"nock": "12.0.3",
"nyc": "15.0.0",
"s3-folder-upload": "2.3.0",
Expand All @@ -71,6 +70,5 @@
"prettier": "./node_modules/@s-ui/lint/.prettierrc.js",
"stylelint": {
"extends": "./node_modules/@s-ui/lint/stylelint.config.js"
},
"dependencies": {}
}
}
}
4 changes: 4 additions & 0 deletions src/main/service/registerStub.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const registerStub = ({onReady} = {}) => {
if (typeof window === 'undefined') {
return
}
if (window.__tcfapi) {
console.warn('[BorosTcf] attempted to register the stub twice')
return
}
if (!registerTcfApiLocator()) {
return
}
Expand Down

0 comments on commit 563a36d

Please sign in to comment.