2015-03-31 20 views
0

我有兩個Ember 1.11項目正在使用簡單驗證通過Ember cli簡單驗證。兩者中最簡單的(基本hello世界應用)工作得很好......實際上它很好用(簡單的認證非常棒)。但是,另一個(最近升級的應用程序)有一些初始化錯誤。Ember CLI簡單驗證 - 無法讀取屬性'unde'

我的錯誤是:

Error while processing route: receiving.index Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined 

而且它在ApplicationRouteMixin打破了該線路上beforeModel功能:

_this.get(Configuration.sessionPropertyName).on(event, function(error) { 
    Array.prototype.unshift.call(arguments, event); 
    var target = routeEntryComplete ? _this : transition; 
    target.send.apply(target, arguments); 
}); 

的Configuration.sessionPropertyName是 「會話」,它顯然不能找到它。我沒有能夠在這個項目之外重新創建它,所以任何幫助表示讚賞。

山姆

+0

您是否更新Simple Auth? – zeppelin 2015-03-31 17:34:34

+0

我試過用0.7.3和master分支。這兩個錯誤仍然存​​在。 – sam 2015-03-31 18:16:27

+0

您以前使用過什麼版本? – zeppelin 2015-03-31 19:48:50

回答

1

問題源於一個事實,即依賴(ember-modals)中的一個在初始化過程中不正確實例化的route:application單,防止進一步的注射。 ember-simple-auth通常會將它的session服務注入route:application,但是這種嘗試卻無聲無息地失敗了。這種行爲has been fixedember-modals0.3.0,所以升級應該解決問題。

+0

你很幫忙!非常感謝你的幫助 – sam 2015-04-06 21:54:01

相關問題