mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: fix error when useragent header missing
This commit is contained in:
1 parent
1636e8a09d
commit
e37d84135b
1 file changed
+1
-1
@@ -130,7 +130,7 @@ env.addGlobal('avatarUrl', avatar);
|
||||
env.addGlobal('formatSeconds', misc.formatSeconds);
|
||||
env.addGlobal('model', global.Hydro.model);
|
||||
env.addGlobal('ui', global.Hydro.ui);
|
||||
env.addGlobal('isIE', (str) => str.includes('MSIE') || str.includes('rv:11.0'));
|
||||
env.addGlobal('isIE', (str) => (str ? (str.includes('MSIE') || str.includes('rv:11.0')) : false));
|
||||
env.addGlobal('set', (obj, key, val) => {
|
||||
if (val !== undefined) obj[key] = val;
|
||||
else Object.assign(obj, key);
|
||||
|
||||
Reference in new issue
Block a user