From 1c0e143c1d1480778c078a00f54b52afd0219977 Mon Sep 17 00:00:00 2001 From: Kushagra Gour Date: Thu, 15 Mar 2018 11:41:35 +0530 Subject: [PATCH] dont show asktoimport modal when no items in local machine --- src/script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/script.js b/src/script.js index 74387ae..6553e88 100644 --- a/src/script.js +++ b/src/script.js @@ -2151,6 +2151,9 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn, askTo window.oldSavedCreationsCountEl ) { fetchItems(false, true).then(items => { + if (!items.length) { + return; + } scope.oldSavedItems = items; window.oldSavedCreationsCountEl.textContent = items.length; scope.toggleModal(askToImportModal);