Fix val is undefined

pull/1/head
yflory 5 years ago
parent 67c8db8b99
commit 5e80efda58

@ -788,6 +788,7 @@ define([
getAllStores().forEach(function (s) {
s.manager.getPadAttribute(data, waitFor(function (err, val) {
if (err) { return; }
if (!val || typeof(val) !== "object") { return void console.error("Not an object!"); }
if (!res.value || res.atime < val.atime) {
res.atime = val.atime;
res.value = val.value;

@ -741,8 +741,12 @@ define([
cb = cb || function () {};
var sfId = Env.user.userObject.getSFIdFromHref(data.href);
if (sfId) {
var sfData = Env.user.proxy[UserObject.SHARED_FOLDERS][sfId];
setTimeout(function () {
cb(null, Env.user.proxy[UserObject.SHARED_FOLDERS][sfId][data.attr]);
cb(null, {
value: sfData[data.attr],
atime: 1
});
});
return;
}

Loading…
Cancel
Save