Skip to content

Commit 6a5b131

Browse files
committed
Ensure aliases aren't double added
1 parent 9b72043 commit 6a5b131

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/account-summaries/account-summaries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ alias(AccountSummaries.prototype, 'getAccountByWebPropertyId',
245245
* @param {string} aliasName The reference property's alias name.
246246
*/
247247
function alias(object, referenceProp, aliasName) {
248-
if (Object.defineProperty) {
248+
if (Object.defineProperty && !Object.hasOwnProperty.call(object, aliasName)) {
249249
Object.defineProperty(object, aliasName, {
250250
get: function() {
251251
return object[referenceProp];

0 commit comments

Comments
 (0)