فهرست منبع

feature: 代码优化

xiongxt 2 سال پیش
والد
کامیت
89b65eaa94
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      src/queue.ts

+ 4 - 4
src/queue.ts

@@ -80,13 +80,13 @@ class Node<T = any> {
 
   destroy() {
     if (this.prev) {
-      this.prev.setNext(null);
+      this.prev.setNext(undefined);
     }
     if (this.next) {
-      this.next.setPrev(null);
+      this.next.setPrev(undefined);
     }
-    this.prev = null;
-    this.next = null;
+    this.prev = undefined;
+    this.next = undefined;
     this.self = undefined;
   }
 }