From 7748b7072ba504af35ea8e4dde9e87bfc2e19e76 Mon Sep 17 00:00:00 2001 From: Alessandro Chitolina Date: Mon, 9 Sep 2024 14:42:43 +0200 Subject: [PATCH] [DataStructure] fix: use globalThis instead of global --- src/BTree.js | 2 +- src/HashTable.js | 2 +- src/LinkedList.js | 2 +- src/PriorityQueue.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BTree.js b/src/BTree.js index d506cdc..03636d0 100644 --- a/src/BTree.js +++ b/src/BTree.js @@ -400,4 +400,4 @@ BTree.COMPARISON_EQUAL = 0; BTree.COMPARISON_LESSER = -1; BTree.COMPARISON_GREATER = 1; -global.BTree = BTree; +globalThis.BTree = BTree; diff --git a/src/HashTable.js b/src/HashTable.js index 339bc4d..69a54d1 100644 --- a/src/HashTable.js +++ b/src/HashTable.js @@ -421,4 +421,4 @@ class HashTable extends mix(Object, GenericCollectionTrait) { } } -global.HashTable = HashTable; +globalThis.HashTable = HashTable; diff --git a/src/LinkedList.js b/src/LinkedList.js index 0113ef3..1535478 100644 --- a/src/LinkedList.js +++ b/src/LinkedList.js @@ -180,4 +180,4 @@ class LinkedList extends mix(Object, GenericCollectionTrait) { } } -global.LinkedList = LinkedList; +globalThis.LinkedList = LinkedList; diff --git a/src/PriorityQueue.js b/src/PriorityQueue.js index 86c0f8b..23ef034 100644 --- a/src/PriorityQueue.js +++ b/src/PriorityQueue.js @@ -263,4 +263,4 @@ class PriorityQueue extends mix(Object, GenericCollectionTrait) { } } -global.PriorityQueue = PriorityQueue; +globalThis.PriorityQueue = PriorityQueue;