Skip to content

Commit a9c51a7

Browse files
committed
Use localstorage clear.
1 parent a0cb8aa commit a9c51a7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/device/webusb_serial/website/application.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,9 +755,7 @@
755755
await this.forgetAllPorts();
756756

757757
// Clear localStorage
758-
for (const key in localStorage) {
759-
localStorage.removeItem(key);
760-
}
758+
localStorage.clear();
761759

762760
// reload the page
763761
window.location.reload();

0 commit comments

Comments
 (0)