From 4754f1e78ab00aa3895d5be93ac2146f2dc97d88 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 15 Feb 2018 11:06:40 +0000 Subject: [PATCH] Use bare objects without prototypes for tracking filenames --- .../web/public/coffee/ide/history/HistoryV2Manager.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/history/HistoryV2Manager.coffee b/services/web/public/coffee/ide/history/HistoryV2Manager.coffee index f5124a71d9..574190c870 100644 --- a/services/web/public/coffee/ide/history/HistoryV2Manager.coffee +++ b/services/web/public/coffee/ide/history/HistoryV2Manager.coffee @@ -197,10 +197,12 @@ define [ _perDocSummaryOfUpdates: (updates) -> # Track current_pathname -> original_pathname - original_pathnames = {} + # create bare object for use as Map + # http://ryanmorr.com/true-hash-maps-in-javascript/ + original_pathnames = Object.create(null) # Map of original pathname -> doc summary - docs_summary = {} + docs_summary = Object.create(null) updatePathnameWithUpdateVersions = (pathname, update, deleted) -> # docs_summary is indexed by the original pathname the doc