当我在开发工具中遇到断点时,我检查变量' LoggingSystem":
private initialise = () => {
var menuHtml = "";
for (let item of LoggingSystem.getDefault().UserPrivilegeList) {
if (item.ScreenId != 4) { //this is hit ok, and item has the right information

我看到"语法错误..."堆栈消息:
"SyntaxError: Unexpected end of input
at MenuController.initialise (http://localhost/LoggingWebApp/Scripts/es/MenuController.js:12:30)
at new MenuController (http://localhost/LoggingWebApp/Scripts/es/MenuController.js:118:18)
at LoggingSystem.loadedCallBack (http://localhost/LoggingWebApp/Logging/Festival?festivalId=9:203:26)
at Object.success (http://localhost/LoggingWebApp/Scripts/es/LoggingSystem.js:186:39)
at fire (http://localhost/LoggingWebApp/Scripts/jquery-3.3.1.js:3268:31)
at Object.fireWith [as resolveWith] (http://localhost/LoggingWebApp/Scripts/jquery-3.3.1.js:3398:7)
at done (http://localhost/LoggingWebApp/Scripts/jquery-3.3.1.js:9305:14)
at XMLHttpRequest.<anonymous> (http://localhost/LoggingWebApp/Scripts/jquery-3.3.1.js:9548:9)"
&#13;
代码运行正常,只有当我检查变量时才能看到错误。
getDefault是LoggingSystem类中的静态方法
private static defaultModel: any;
static getDefault = () => {
return LoggingSystem.defaultModel;
}
&#13;
我出错的任何想法? 感谢