Resolve requireUser minify messed up?


#1

Hello,

I use meteor with ui router now over a month and ran into the following problem when using “meteor --production”.

The following state throws an error in production mode:

angular.module("moduleName")
.config(['$urlRouterProvider', '$stateProvider', '$locationProvider',
  function ($urlRouterProvider, $stateProvider, $locationProvider) {

    $stateProvider
    .state('home.editArticle', {
        url: ..
        views: {
         ..
        },
        resolve: {
          "currentUser": ["$meteor", function($meteor){
            return $meteor.requireUser();
          }]
        }
      })

I just want users who are logged in. But after minification I get the following error when trying to access this state. On debug it’s blocking perfectly. Is something here not minifysafe?

TypeError: s[u].apply is not a function
at p.e.$get.p.$broadcast (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:51)
at a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:55
at u (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:50)
at a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:50
at p.e.$get.p.$eval (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:51)
at p.e.$get.p.$digest (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:51)
at p.e.$get.p.$apply (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:51)
at HTMLButtonElement.<anonymous> (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:53)
at HTMLButtonElement.ie.event.dispatch (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:44)
at HTMLButtonElement.ie.event.add.g.handle (a938aa388028036a5d8d4e83c3b92ff13c1ba6fa.js:44)

#2

Bump.

I placed user checking in controller. But that’s not what I want for final