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()
我不明白,为什么它不工作?请帮助我