This is not like your sample code is aligned with the error message. You mentioned the error:
TypeError: Cannot read property 'userData' of null
but looking at the sample code, I see that the error will be valid:
TypeError: Cannot read property 'editAdminId' of null
, , userData, . , Template.instance() javascript. :
Template.editAdmin.onCreated(function () {
this.userData = new ReactiveVar([]);
});
Template.editAdmin.onRendered(function () {
const instance = Template.instance();
Meteor.call("getUsersData", this.data, function (err, result) {
instance.userData.set(result);
});
});