2017-07-10 3 views
0

Quand je lance météore il est dit « emplacement est pas défini »emplacement non défini sur Meteor commencer

// 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

Est-il un client seul script? – ghybs

+0

@ghybs Oui, je l'ai résolu avec if (typeof location! = 'Undefined) {} –

Répondre

0

https://github.com/TylerL-uxai/decentralized-website

Je l'ai résolu avec une instruction 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'); 
     }); 
    } 
}