diff --git a/www/js/services/wot-services.js b/www/js/services/wot-services.js index 5de7c98f33decf3c98060e415a81a05bacafaa8d..4d8385c13a856fd52893e810d9fbf72a798ec7b7 100644 --- a/www/js/services/wot-services.js +++ b/www/js/services/wot-services.js @@ -650,9 +650,11 @@ angular.module('cesium.wot.services', ['ngApi', 'cesium.bma.services', 'cesium.c if (!pubkey && uid && !options.force) { return BMA.wot.member.getByUid(uid) .then(function(member) { - if (member) return loadData(member.pubkey, member.uid, options); // recursive call + if (member) return loadData(member.pubkey, member.uid, options); // recursive call, with a pubkey //throw {message: 'NOT_A_MEMBER'}; - return loadData(pubkey, uid, angular.copy(options, {force: true})); + var options = angular.copy(options ||Â {}); + options.force = true; + return loadData(pubkey, uid, options); // Loop with force=true }); }