Skip to content

Commit f505fc3

Browse files
Artur-claude
andcommitted
fix: use nullish coalescing assignment (??=) for feature flag setup
Use ??= instead of ||= for initializing Vaadin.featureFlags objects. This is more semantically correct as it only assigns when the value is nullish (null/undefined) rather than any falsy value, preventing accidental overwrites of existing objects. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 95377a7 commit f505fc3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dev/breadcrumb.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<script type="module" src="./common.js"></script>
88
<script type="module">
99
// Enable experimental breadcrumb component
10-
window.Vaadin ||= {};
11-
window.Vaadin.featureFlags ||= {};
10+
window.Vaadin ??= {};
11+
window.Vaadin.featureFlags ??= {};
1212
window.Vaadin.featureFlags.breadcrumbComponent = true;
1313

1414
import '@vaadin/breadcrumb/vaadin-breadcrumb.js';

packages/breadcrumb/test/breadcrumb.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { expect } from '@vaadin/chai-plugins';
22
import { fixtureSync, nextFrame } from '@vaadin/testing-helpers';
33

44
// Enable experimental breadcrumb component
5-
window.Vaadin ||= {};
6-
window.Vaadin.featureFlags ||= {};
5+
window.Vaadin ??= {};
6+
window.Vaadin.featureFlags ??= {};
77
window.Vaadin.featureFlags.breadcrumbComponent = true;
88

99
import '../vaadin-breadcrumb.js';

0 commit comments

Comments
 (0)