我已经下载了“TempHire”示例并使用 IE 10 (Windows 8) 运行。下一个错误出现在breeze.debug.js
:
Unhandled exception at line 13707, column 13 in http://localhost:49795/scripts/breeze.debug.js
0x80070003 - JavaScript runtime error: The system cannot find the path specified.
错误部分:
if (typeof (localStorage) != 'undefined') {
var mongoMachineId = parseInt(localStorage['mongoMachineId']); //The error appeared here
if (mongoMachineId >= 0 && mongoMachineId <= 16777215) {
machine = Math.floor(localStorage['mongoMachineId']);
}
// Just always stick the value in.
localStorage['mongoMachineId'] = machine;
document.cookie = 'mongoMachineId=' + machine + ';expires=Tue, 19 Jan 2038 05:00:00 GMT';
}
问题是typeof (localStorage) != 'undefined'
因为true
出现异常“”时typeof (localStorage)
是相等的。'unknown'
The system cannot find the path specified.
我不知道如何准确地重现这个错误,因为它可能是 localStorage 的随机错误。
我删除了所有浏览器历史记录并且一切正常,但后来错误仍然存在于 IE10、Google Chrome 27 和 Firefox21 中。
请任何帮助将不胜感激。