From 2ecb46d840757d19b6aa323d2eacffbf21ebb8e4 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Thu, 18 Nov 2021 09:46:56 +0900 Subject: [PATCH] Fix memory leak --- lib/utils/style-variables/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/style-variables/index.js b/lib/utils/style-variables/index.js index 3127166a4..eca2f39d1 100644 --- a/lib/utils/style-variables/index.js +++ b/lib/utils/style-variables/index.js @@ -32,8 +32,8 @@ module.exports = { StyleVariablesContext } -/** @type {Map} */ -const cache = new Map() +/** @type {WeakMap} */ +const cache = new WeakMap() /** * Get the style vars context * @param {RuleContext} context