You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added protection against multiple FidesJS script loading on the same page with configurable override option [#6416](https://github.com/ethyca/fides/pull/6416)
29
+
27
30
### Fixed
28
31
- Fix default tab not being set in the integration detail page for Manual Tasks integrations [#6417](https://github.com/ethyca/fides/pull/6417)
constmultipleLoadingMessage=`${GLOBAL_NAME} detected that it was already loaded on this page, aborting execution! See https://www.ethyca.com/docs/dev-docs/js/troubleshooting for more information.`;
// Intended for browser <script> tag - defines `Fides` global. Also supports UMD loaders.
171
174
file: `dist/${name}.js`,
172
-
name: isExtension ? undefined : "Fides",
175
+
name: isExtension ? undefined : GLOBAL_NAME,
173
176
format: isExtension ? "es" : "umd",
174
177
sourcemap: IS_DEV ? "inline" : false,
175
178
amd: {
176
179
define: undefined,// prevent the bundle from registering itself as an AMD module, even if an AMD loader (like RequireJS) is present on the page. This allows FidesJS to use Rollup's `umd` format to support both `iife` and `cjs` modules, but excludes AMD.
177
180
},
181
+
// Use the "banner" option to prepend a defensive check into the code to guard against loading FidesJS multiple times on the same page
182
+
banner: isExtension
183
+
? undefined
184
+
: `if(typeof ${GLOBAL_NAME}!=="undefined" && ${GLOBAL_NAME}.options?.fidesUnsupportedRepeatedScriptLoading!=="enabled_acknowledge_not_supported") {throw new Error("${multipleLoadingMessage}");}`,
0 commit comments