We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00c966a commit c8ce989Copy full SHA for c8ce989
src/core/index.ts
@@ -344,7 +344,7 @@ export const withScan = <T>(
344
) => {
345
setOptions(options);
346
const { isInIframe, componentAllowList } = ReactScanInternals;
347
- if (isInIframe) return component;
+ if (isInIframe || options.enabled === false) return component;
348
if (!componentAllowList) {
349
ReactScanInternals.componentAllowList = new WeakMap<
350
React.ComponentType<any>,
@@ -363,7 +363,7 @@ export const withScan = <T>(
363
export const scan = (options: Options = {}) => {
364
365
const { isInIframe } = ReactScanInternals;
366
- if (isInIframe) return;
+ if (isInIframe || options.enabled === false) return;
367
368
start();
369
};
0 commit comments