From 41205aef200233d4dce69dc1cac2d352e529c168 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 19 May 2015 16:38:02 +0200 Subject: [PATCH] Work around xo-web bug due to Angular. --- packages/xo-collection/src/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/xo-collection/src/index.js b/packages/xo-collection/src/index.js index 2842f9bbd..5b507da33 100644 --- a/packages/xo-collection/src/index.js +++ b/packages/xo-collection/src/index.js @@ -84,7 +84,11 @@ export default class Index { if (hash != null) { ( itemsByHash[hash] || - (itemsByHash[hash] = Object.create(null)) + + // FIXME: We do not use objects without prototype for now + // because it breaks Angular in xo-web, change it back when + // this is fixed. + (itemsByHash[hash] = {}) )[key] = value keysToHash[key] = hash @@ -115,7 +119,9 @@ export default class Index { if (hash != null) { ( itemsByHash[hash] || - (itemsByHash[hash] = Object.create(null)) + + // FIXME: idem: change back to Object.create(null) + (itemsByHash[hash] = {}) )[key] = value keysToHash[key] = hash