Skip to content

Commit

Permalink
cleanup old contexts in config hash map (#4571)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlc authored Jun 7, 2021
1 parent 67ee5e0 commit f1e3168
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/jit/lib/setupContextUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ export function getContext(
contextSourcesMap.get(oldContext).delete(sourcePath)
if (contextSourcesMap.get(oldContext).size === 0) {
contextSourcesMap.delete(oldContext)
for (let [tailwindConfigHash, context] of configContextMap) {
if (context === oldContext) {
configContextMap.delete(tailwindConfigHash)
}
}
for (let disposable of oldContext.disposables.splice(0)) {
disposable(oldContext)
}
Expand Down

0 comments on commit f1e3168

Please sign in to comment.