{"action":"closed","issue":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/940","labels_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/940/labels{/name}","comments_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/940/comments","events_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/940/events","html_url":"https://github.com/Urigo/angular-meteor/issues/940","id":121711787,"number":940,"title":"stateProvider resolve and new helpers fail for binding one object","user":{"login":"burock","id":786494,"avatar_url":"https://avatars.githubusercontent.com/u/786494?v=3","gravatar_id":"","url":"https://api.github.com/users/burock","html_url":"https://github.com/burock","followers_url":"https://api.github.com/users/burock/followers","following_url":"https://api.github.com/users/burock/following{/other_user}","gists_url":"https://api.github.com/users/burock/gists{/gist_id}","starred_url":"https://api.github.com/users/burock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burock/subscriptions","organizations_url":"https://api.github.com/users/burock/orgs","repos_url":"https://api.github.com/users/burock/repos","events_url":"https://api.github.com/users/burock/events{/privacy}","received_events_url":"https://api.github.com/users/burock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-12-11T13:54:06Z","updated_at":"2015-12-20T17:50:45Z","closed_at":"2015-12-20T17:50:45Z","body":"Hi,\r\n\r\nIn the below code if i try to bind and retrieve one object using $reactive and helpers, I get the below exception whatever I tried (ofcourse the old method works). \r\n\r\n```\r\nTypeError: Cannot read property 'changed' of undefined\r\n    at ReactiveContext._propertyChanged (https://super-eba-sfdc.c9.io/packages/angular-meteor-data.js?6225e95c3f8355c87f21a32f39da179fc9220672:2390:45)\r\n    at ReactiveContext._handleNonCursor (https://super-eba-sfdc.c9.io/packages/angular-meteor-data.js?6225e95c3f8355c87f21a32f39da179fc9220672:2294:18)\r\n    at https://super-eba-sfdc.c9.io/packages/angular-meteor-data.js?6225e95c3f8355c87f21a32f39da179fc9220672:2345:26\r\n    at Object.Tracker.nonreactive (https://super-eba-sfdc.c9.io/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:615:12)\r\n    at https://super-eba-sfdc.c9.io/packages/angular-meteor-data.js?6225e95c3f8355c87f21a32f39da179fc9220672:2332:23\r\n    at Tracker.Computation._compute (https://super-eba-sfdc.c9.io/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:349:36)\r\n    at new Tracker.Computation (https://super-eba-sfdc.c9.io/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:237:10)\r\n    at Object.Tracker.autorun (https://super-eba-sfdc.c9.io/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:588:11)\r\n    at https://super-eba-sfdc.c9.io/packages/angular-meteor-data.js?6225e95c3f8355c87f21a32f39da179fc9220672:2329:44\r\n    at Array.forEach (native)\r\n```\r\nCan anyone advice what am I doing missing?\r\n\r\nCheers and thanks,\r\nb\r\n```  \r\n      resolve: {\r\n                        currentUser: ($q) => {\r\n                            if (Meteor.userId() == null) {\r\n                              return $q.reject('AUTH_REQUIRED');\r\n                            }\r\n                            else {\r\n                              return $q.resolve();\r\n                            }\r\n                    },\r\n                    \"singleBuildingSubscription\":  ['$q', function ($q) {\r\n                          var deferred = $q.defer();\r\n                     \r\n                          Meteor.subscribe('buildings', {\r\n                            onReady: deferred.resolve,\r\n                            onStop: deferred.reject\r\n                          });\r\n\r\n                        return deferred.promise;\r\n                    }],\r\n                    \"building\": ['$meteor', '$rootScope', '$stateParams', '$q',\r\n                        'singleBuildingSubscription','$reactive',\r\n                        function($meteor, $rootScope, $stateParams, $q,\r\n                                singleBuildingSubscription,$reactive) {\r\n                            var b = $meteor.object(Buildings, $stateParams.buildingId, false);\r\n                            \r\n                            var deferred = $q.defer();\r\n                            /*\r\n                            \r\n                            // Buildings collection is ok but below throws an error\r\n                            $reactive(this).helpers({\r\n                              b : () => Buildings.findOne({_id: $stateParams.buildingId})\r\n                            });*/\r\n                            \r\n                            var bb = this.b;\r\n                            if (!bb._id) {\r\n                                console.log('NOT_FOUND');\r\n                                deferred.reject('NOT_FOUND');\r\n                                return deferred.promise;\r\n                            }\r\n                            $rootScope.building = bb;\r\n                            return bb;\r\n                        }\r\n                    ]\r\n```"}}