Skip to content

Commit 60d8969

Browse files
committed
chore: fix build issue
1 parent a45f0c2 commit 60d8969

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

packages/sdk/browser/src/LDPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Hook, LDPlugin as LDPluginBase } from '@launchdarkly/js-client-sdk-common';
1+
import { Hook, LDPluginBase } from '@launchdarkly/js-client-sdk-common';
22

33
import { LDClient } from './LDClient';
44

packages/shared/sdk-client/src/api/LDPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { LDPluginBase } from '@launchdarkly/js-sdk-common';
1+
import { LDPluginBase as LDPluginBaseCommon } from '@launchdarkly/js-sdk-common';
22

33
import { LDDebugOverride } from '../flag-manager/FlagManager';
44

5-
export interface LDPlugin<TClient, THook> extends LDPluginBase<TClient, THook> {
5+
export interface LDPluginBase<TClient, THook> extends LDPluginBaseCommon<TClient, THook> {
66
/**
77
* An optional function called if the plugin wants to register debug capabilities.
88
* This method allows plugins to receive a debug override interface for

packages/shared/sdk-client/src/flag-manager/FlagManager.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,11 @@ export default class DefaultFlagManager implements FlagManager {
258258
}
259259

260260
clearAllOverrides() {
261-
if (!this._overrides) {
262-
return {}; // No overrides to clear, return empty object for consistency
261+
if (this._overrides) {
262+
const clearedOverrides = { ...this._overrides };
263+
this._overrides = undefined; // Reset to undefined
264+
this._flagUpdater.handleFlagChanges(null, Object.keys(clearedOverrides), 'override');
263265
}
264-
265-
const clearedOverrides = { ...this._overrides };
266-
this._overrides = undefined; // Reset to undefined
267-
this._flagUpdater.handleFlagChanges(null, Object.keys(clearedOverrides), 'override');
268-
return clearedOverrides;
269266
}
270267

271268
getAllOverrides() {

packages/shared/sdk-client/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type {
3636
LDIdentifyTimeout,
3737
LDIdentifyShed,
3838
LDClientIdentifyResult,
39-
LDPlugin,
39+
LDPluginBase,
4040
} from './api';
4141

4242
export type { DataManager, DataManagerFactory, ConnectionParams } from './DataManager';

packages/shared/sdk-client/src/plugins/safeRegisterDebugOverridePlugins.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { internal, LDLogger } from '@launchdarkly/js-sdk-common';
22

3-
import { LDPlugin } from '../api';
3+
import { LDPluginBase } from '../api';
44
import { LDDebugOverride } from '../flag-manager/FlagManager';
55

66
/**
@@ -13,7 +13,7 @@ import { LDDebugOverride } from '../flag-manager/FlagManager';
1313
export function safeRegisterDebugOverridePlugins<TClient, THook>(
1414
logger: LDLogger,
1515
debugOverride: LDDebugOverride,
16-
plugins: LDPlugin<TClient, THook>[],
16+
plugins: LDPluginBase<TClient, THook>[],
1717
): void {
1818
plugins.forEach((plugin) => {
1919
try {

0 commit comments

Comments
 (0)