0
嗨我有奇怪的問題,當我運行RSpec的測試,有時顯示消息「Backbone.history」 [未定義]不是一個對象
'http://127.0.0.1:59796/assets/application.js|15727|TypeError: Result of expression 'Backbone.history' [undefined] is not an object
和測試失敗。 我開始Backbone.history這樣的:
$ ->
$('body#pages-dashboard').each ->
new Scanradar.Routers.TasksRouter({tasks: []})
Backbone.history.start()
我不明白,爲什麼它不工作?請幫助我