当我运行meteor时,它说“位置未定义”
// redirect on start to dashboard on file protocol
if(location.origin === 'file://') {
FlowRouter.wait();
FlowRouter.initialize({hashbang: true});
Meteor.startup(function() {
FlowRouter.go('dashboard');
});
}
答案 0 :(得分:0)
您的意思是window.location.origin
吗?
答案 1 :(得分:0)
https://github.com/TylerL-uxai/decentralized-website
我用if语句
解决了这个问题// redirect on start to dahsboard on file protocol
if (typeof location != 'undefined') {
if(location.origin === 'file://') {
FlowRouter.wait();
FlowRouter.initialize({hashbang: true});
Meteor.startup(function() {
FlowRouter.go('whatIdo');
});
}
}