Skip to content

Commit d13c429

Browse files
committed
chore: fix build issue
1 parent 0013da3 commit d13c429

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
@@ -245,14 +245,11 @@ export default class DefaultFlagManager implements FlagManager {
245245
}
246246

247247
clearAllOverrides() {
248-
if (!this._overrides) {
249-
return {}; // No overrides to clear, return empty object for consistency
248+
if (this._overrides) {
249+
const clearedOverrides = { ...this._overrides };
250+
this._overrides = undefined; // Reset to undefined
251+
this._flagUpdater.handleFlagChanges(null, Object.keys(clearedOverrides), 'override');
250252
}
251-
252-
const clearedOverrides = { ...this._overrides };
253-
this._overrides = undefined; // Reset to undefined
254-
this._flagUpdater.handleFlagChanges(null, Object.keys(clearedOverrides), 'override');
255-
return clearedOverrides;
256253
}
257254

258255
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)