Skip to content

Commit

Permalink
Merge pull request #85 from QuickCorp/v2.3
Browse files Browse the repository at this point in the history
accurate objects name
  • Loading branch information
jeanmachuca committed Aug 15, 2021
2 parents 76bf828 + a6aa685 commit 7c8d7d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QCObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
return r;
};
ComplexStorageCache.prototype.getID = function(object) {
var cachedObjectID = "cachedObject_" + Base64.encode(_DataStringify(object).replace(",", "_").replace("{", "_").replace("}", "_"));
var cachedObjectID = "cachedObject_" + Base64.encode(_DataStringify(object).replace(/\{|\}|,/g, "_"));
return cachedObjectID;
};
ComplexStorageCache.prototype.save = function(object, cachedNewResponse) {
Expand Down Expand Up @@ -665,7 +665,7 @@
if (typeof o.constructor === "function") {
ret = o.constructor.name;
} else if (typeof o.constructor === "object") {
ret = o.constructor.toString().split(" ")[1].replace("]", "");
ret = o.constructor.toString().replace(/\[(.*?)\]/g, "$1").split(" ").slice(1).join("");
}
return ret;
};
Expand Down

0 comments on commit 7c8d7d9

Please sign in to comment.