diff options
author | geireann <geireann_lindfield_roberts@brown.edu> | 2021-07-24 14:23:54 -0400 |
---|---|---|
committer | geireann <geireann_lindfield_roberts@brown.edu> | 2021-07-24 14:23:54 -0400 |
commit | f5e2c2bc70ea1c509501ae530dbcc4541cea0dba (patch) | |
tree | f006a9a820b1165450c80c719eb1b6e980781348 /src | |
parent | aa67222bc1a80ae11d1a29b32d5cb54199b38011 (diff) |
duplicate key console error
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 4 | ||||
-rw-r--r-- | src/client/views/ContextMenu.tsx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 366207334..4989cac7c 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -448,7 +448,7 @@ export class CurrentUserUtils { doc.emptyWebpage = Docs.Create.WebDocument("", { title: "webpage", _nativeWidth: 850, isTemplateDoc: true, _height: 512, _width: 400, useCors: true, system: true, cloneFieldFilter: new List<string>(["system"]) }); } if (doc.emptyMap === undefined) { - doc.emptyMap = Docs.Create.MapDocument(new List<Doc>(), { title: "map", _width: 800, _height: 600, system: true, cloneFieldFilter: new List<string>(["system"]) }); + doc.emptyMap = Docs.Create.MapDocument("", { title: "map", _width: 800, _height: 600, system: true, cloneFieldFilter: new List<string>(["system"]) }); ((doc.emptyMap as Doc).proto as Doc)["dragFactory-count"] = 0; } if (doc.activeMobileMenu === undefined) { @@ -470,7 +470,7 @@ export class CurrentUserUtils { { toolTip: "Tap to create a mobile view in a new pane, drag for a mobile view", title: "Phone", icon: "mobile", click: 'openOnRight(Doc.UserDoc().activeMobileMenu)', drag: 'this.dragFactory', dragFactory: doc.activeMobileMenu as Doc }, { toolTip: "Tap to create a custom header note document, drag for a custom header note", title: "Custom", icon: "window-maximize", click: 'openOnRight(delegateDragFactory(this.dragFactory))', drag: 'delegateDragFactory(this.dragFactory)', dragFactory: doc.emptyHeader as Doc }, { toolTip: "Toggle a Calculator REPL", title: "repl", icon: "calculator", click: 'addOverlayWindow("ScriptingRepl", { x: 300, y: 100, width: 200, height: 200, title: "Scripting REPL" })' }, - { toolTip: "Tap to create a map in the new pane, drag for a map", title: "Map", icon: "map-marker-alt", click: 'openOnRight(copyDragFactory(this.dragFactory))', drag: 'copyDragFactory(this.dragFactory)', dragFactory: doc.emptyMap as Doc, noviceMode: true} + { toolTip: "Tap to create a map in the new pane, drag for a map", title: "Map", icon: "map-marker-alt", click: 'openOnRight(copyDragFactory(this.dragFactory))', drag: 'copyDragFactory(this.dragFactory)', dragFactory: doc.emptyMap as Doc, noviceMode: true } ]; } diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx index d96de72e3..c4fabbf99 100644 --- a/src/client/views/ContextMenu.tsx +++ b/src/client/views/ContextMenu.tsx @@ -218,7 +218,7 @@ export class ContextMenu extends React.Component { @computed get menuItems() { if (!this._searchString) { - return this._items.map(item => <ContextMenuItem {...item} noexpand={this.itemsNeedSearch ? true : (item as any).noexpand} key={item.description} closeMenu={this.closeMenu} />); + return this._items.map((item, ind) => <ContextMenuItem {...item} noexpand={this.itemsNeedSearch ? true : (item as any).noexpand} key={ind + item.description} closeMenu={this.closeMenu} />); } return this.filteredViews; } |