Skip to content

Commit fe1264c

Browse files
committed
Persisted dismiss
1 parent c2246ca commit fe1264c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/util/src/emulator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ function getOrCreateEl(id: string): { created: boolean; element: HTMLElement } {
179179
return { created, element: parentDiv };
180180
}
181181

182+
let previouslyDismissed = false;
182183
/**
183184
* Updates Emulator Banner. Primarily used for Firebase Studio
184185
* @param name
@@ -193,7 +194,8 @@ export function updateEmulatorBanner(
193194
typeof window === 'undefined' ||
194195
typeof document === 'undefined' ||
195196
!isCloudWorkstation(window.location.host) ||
196-
emulatorStatus[name] === isRunningEmulator
197+
emulatorStatus[name] === isRunningEmulator ||
198+
previouslyDismissed
197199
) {
198200
return;
199201
}
@@ -243,6 +245,7 @@ export function updateEmulatorBanner(
243245
closeBtn.style.paddingLeft = '5px';
244246
closeBtn.innerHTML = ' ×';
245247
closeBtn.onclick = () => {
248+
previouslyDismissed = true;
246249
tearDown();
247250
};
248251
learnMoreLink.setAttribute('id', learnMoreId);

0 commit comments

Comments
 (0)