From 10cf1bd9ef693f803b6a06a46d9bcf663a643df7 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 12 Jan 2021 14:32:20 +0100 Subject: [PATCH] checked if liks are given --- apps/remix-ide/src/app/ui/contextMenu.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app/ui/contextMenu.js b/apps/remix-ide/src/app/ui/contextMenu.js index 148261ee5b..334c720e1f 100644 --- a/apps/remix-ide/src/app/ui/contextMenu.js +++ b/apps/remix-ide/src/app/ui/contextMenu.js @@ -46,11 +46,15 @@ module.exports = (event, items, linkItems) => { return current }) - const menuForLinks = Object.keys(linkItems).map((item, index) => { - const current = yo`` - current.onclick = () => { hide(null, true) } - return current - }) + let menuForLinks = yo`` + if (linkItems) { + menuForLinks = Object.keys(linkItems).map((item, index) => { + const current = yo`` + current.onclick = () => { hide(null, true) } + return current + }) + } + const container = yo`