修复代码编辑器访问caller报错等问题

This commit is contained in:
nonameShijian 2024-02-13 14:33:17 +08:00
parent 25aee55493
commit 31402ab1de
1 changed files with 5 additions and 1 deletions

View File

@ -7883,7 +7883,11 @@ export class Library extends Uninstantable {
var icon = document.createElement("span");
var className = "cm-completionIcon cm-completionIcon-";
if (obj) {
const type = typeof obj[text];
// 解决访问caller报错等问题
let type;
try {
type = typeof obj[text];
} catch {}
if (type == 'function') {
className += 'function';
}