Skip to content

Commit e46ee6e

Browse files
committed
use json compare
1 parent 474b697 commit e46ee6e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎params.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ let maybeCustomParams = DefaultJetStreamParams;
172172
if (globalThis?.JetStreamParamsSource) {
173173
try {
174174
maybeCustomParams = new Params(globalThis?.JetStreamParamsSource);
175-
if (Object.entries(maybeCustomParams.nonDefaultParams).length === 0) {
175+
// We might have parsed the same values again, do a poor-mans deep-equals:
176+
if (JSON.stringify(maybeCustomParams) === JSON.stringify(DefaultJetStreamParams)) {
176177
maybeCustomParams = DefaultJetStreamParams
177178
}
178179
} catch (e) {

0 commit comments

Comments
 (0)