Skip to content

Commit a9b12c3

Browse files
committed
refactor: privacy flags in store
1 parent 6ea05ad commit a9b12c3

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/store.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -740,14 +740,15 @@ export default function Store(
740740
this.SDKConfig[baseUrlKeys] = baseUrls[baseUrlKeys];
741741
}
742742

743-
// Extract privacy flags exclusively from launcherOptions
744-
const launcherOptions = config.launcherOptions;
745-
if (launcherOptions && launcherOptions.hasOwnProperty('noFunctional')) {
746-
this.setNoFunctional(launcherOptions.noFunctional);
743+
// Apply privacy flags from launcherOptions early (methods not yet defined → set fields directly)
744+
const { noFunctional, noTargeting } = config?.launcherOptions ?? {};
745+
746+
if (noFunctional != null) {
747+
this.setNoFunctional(noFunctional);
747748
}
748749

749-
if (launcherOptions && launcherOptions.hasOwnProperty('noTargeting')) {
750-
this.setNoTargeting(launcherOptions.noTargeting);
750+
if (noTargeting != null) {
751+
this.setNoTargeting(noTargeting);
751752
}
752753

753754
if (workspaceToken) {

0 commit comments

Comments
 (0)