mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 08:37:42 +00:00
fix(web): better font-wait null guards
This commit is contained in:
parent
4f814ed577
commit
addaad0dbd
1 changed files with 6 additions and 6 deletions
|
|
@ -2590,14 +2590,14 @@ namespace com.keyman.osk {
|
|||
let keymanweb = com.keyman.singleton;
|
||||
let util = keymanweb.util;
|
||||
|
||||
if(typeof(kfd) == 'undefined' && typeof(ofd) == 'undefined') {
|
||||
return true;
|
||||
}
|
||||
let fontDefined = !!(kfd && kfd['files']);
|
||||
kfd = fontDefined ? kfd : undefined;
|
||||
|
||||
if(typeof(kfd['files']) == 'undefined' && typeof(ofd['files']) == 'undefined') {
|
||||
return true;
|
||||
}
|
||||
let oskFontDefined = !!(ofd && ofd['files']);
|
||||
ofd = oskFontDefined ? ofd : undefined;
|
||||
|
||||
// Automatically 'ready' if the descriptor is explicitly `undefined`.
|
||||
// Thus, also covers the case where both are undefined.
|
||||
var kReady=util.checkFontDescriptor(kfd), oReady=util.checkFontDescriptor(ofd);
|
||||
if(kReady && oReady) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue