我遇到了一個非常奇怪的錯誤:昨天我編寫了一個ember.js應用程序的開始,測試它(一切正常),並將其推送到我的github repo。今天我剛跑grunt serve
(就像我昨天所做的那樣),但現在我在瀏覽器控制檯中開始輸入錯誤TypeError: newHandlerInfo is undefined
。TypeError:newHandlerInfo未在emberjs中定義
我不知道該顯示什麼,所以你可以檢查回購代碼。 https://github.com/OpenCubes/OpenCubes
一些調試後,我發現,而不是拋出一個錯誤,它在燼代碼是null
返回oldHandlerInfo
:
// Ideally we should throw this error to provide maximal
// information to the user that not enough context objects
// were provided, but this proves too cumbersome in Ember
// in cases where inner template helpers are evaluated
// before parent helpers un-render, in which cases this
// error somewhat prematurely fires.
//throw new Error("Not enough context objects were provided to complete a transition to " + targetRouteName + ". Specifically, the " + name + " route needs an object that can be serialized into its dynamic URL segments [" + names.join(', ') + "]");
return oldHandlerInfo; // = UNDEFINED
而且應該已經拋出的錯誤是:
Not enough context objects were provided to complete a transition to view. Specifically, the mod route needs an object that can be serialized into its dynamic URL segments [mod_model.j_id]
非常感謝! – Vinz243