fix: update strings feature flag to be ignored by node when no window exists

pull/3206/head
Ryan Miller 8 months ago
parent 90d3158ba7
commit 913078d940

@ -60,7 +60,10 @@ export function getRawMessage<
R extends DictionaryWithoutPluralStrings[T],
>(...[token, args]: GetMessageArgs<T>): R | T {
try {
if (window?.sessionFeatureFlags?.replaceLocalizedStringsWithKeys) {
if (
typeof window !== 'undefined' &&
window?.sessionFeatureFlags?.replaceLocalizedStringsWithKeys
) {
return token as T;
}

Loading…
Cancel
Save