Clean up properly when clearing label cache
This commit is contained in:
@@ -243,7 +243,9 @@ export const checkFont = (function() {
|
||||
// Make sure that loaded fonts are picked up by Safari
|
||||
measureContext = null;
|
||||
measureFont = undefined;
|
||||
if (labelCache.getCount()) {
|
||||
labelCache.clear();
|
||||
}
|
||||
} else {
|
||||
++checked[font];
|
||||
done = false;
|
||||
|
||||
@@ -21,8 +21,8 @@ class LabelCache extends LRUCache {
|
||||
}
|
||||
|
||||
clear() {
|
||||
super.clear();
|
||||
this.consumers = {};
|
||||
super.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user