@@ -103,7 +103,7 @@ export default class Cache {
103
103
// Insert a new node at head
104
104
const existingNode = this . #cache. get ( key ) ;
105
105
// Update node data if node is already exists
106
- if ( typeof existingNode !== undefined ) {
106
+ if ( typeof existingNode !== " undefined" ) {
107
107
existingNode . value = nodeValue ;
108
108
// Move current node to the head
109
109
this . #linkedList. setHead ( existingNode ) ;
@@ -126,7 +126,7 @@ export default class Cache {
126
126
127
127
const node = this . #cache. get ( key ) ;
128
128
129
- if ( typeof node !== undefined ) {
129
+ if ( typeof node !== " undefined" ) {
130
130
// Check node is live or not
131
131
if ( this . #isStale( node ) ) {
132
132
this . delete ( key ) ;
@@ -156,7 +156,7 @@ export default class Cache {
156
156
delete ( key ) {
157
157
const node = this . #cache. get ( key ) ;
158
158
159
- if ( typeof node !== undefined ) {
159
+ if ( typeof node !== " undefined" ) {
160
160
this . #linkedList. delete ( node ) ;
161
161
// Delete node
162
162
this . #cache. delete ( key ) ;
@@ -202,7 +202,7 @@ export default class Cache {
202
202
has ( key ) {
203
203
const node = this . #cache. get ( key ) ;
204
204
205
- if ( typeof node !== undefined ) {
205
+ if ( typeof node !== " undefined" ) {
206
206
// Check node is live or not
207
207
if ( this . #isStale( node ) ) {
208
208
this . delete ( key ) ;
0 commit comments