Clean up properly when clearing label cache

This commit is contained in:
ahocevar
2019-07-04 16:10:28 +02:00
parent b4306da7bb
commit 5616c535b0
3 changed files with 5 additions and 1 deletions

View File

@@ -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;