GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — inspector: coerce key and value to string in webstorage events · nodejs/node@4d10823

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/inspector
    • webstorage.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/inspector/webstorage.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/webstorage.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const { getOptionValue } = require('internal/options');
77

88
class InspectorLocalStorage extends Storage {
99
setItem(key, value) {
10+
key = `${key}`;
11+
value = `${value}`;
1012
const oldValue = this.getItem(key);
1113
super.setItem(key, value);
1214
if (oldValue == null) {
@@ -17,6 +19,7 @@ class InspectorLocalStorage extends Storage {
1719
}
1820

1921
removeItem(key) {
22+
key = `${key}`;
2023
super.removeItem(key);
2124
itemRemoved(key, true);
2225
}
@@ -29,6 +32,8 @@ class InspectorLocalStorage extends Storage {
2932

3033
const InspectorSessionStorage = class extends Storage {
3134
setItem(key, value) {
35+
key = `${key}`;
36+
value = `${value}`;
3237
const oldValue = this.getItem(key);
3338
super.setItem(key, value);
3439
if (oldValue == null) {
@@ -39,6 +44,7 @@ const InspectorSessionStorage = class extends Storage {
3944
}
4045

4146
removeItem(key) {
47+
key = `${key}`;
4248
super.removeItem(key);
4349
itemRemoved(key, false);
4450
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.