Question: When I run meteor it says "location is not defined"

```
// redirect on start to dashboard on file protocol
if(location.origin === 'file://') {
    FlowRouter.wait();
    FlowRouter.initialize({hashbang: true});

    Meteor.startup(function() {
        FlowRouter.go('dashboard');
    });
}

```

Answer: 
Your **`UpdateProduct`** function expects a parameter of **`id`**,

```
   <button id="btn-update-product" type="button" class="btn btn-warning" ng-click="updateProduct(passidhere)">Save changes</button>

```
Remove the id parameter from your `updateProduct` function as this is not used.