1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-04 20:37:29 +02:00

script.js: show lastSavedCode instead of fetching from lstorage when webapp

This commit is contained in:
Kushagra Gour
2018-01-28 12:10:55 +05:30
parent 335f9a3ef7
commit 9a661869c1

View File

@@ -2440,8 +2440,9 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn
db.getSettings(defaultSettings).then(result => {
if (result.preserveLastCode && lastCode) {
unsavedEditCount = 0;
if (lastCode.id) {
// Ignore for remote db
// For web app environment we don't fetch item from localStorage,
// because the item isn't stored in the localStorage.
if (lastCode.id && window.IS_EXTENSION) {
db.local.get(lastCode.id, function(itemResult) {
if (itemResult[lastCode.id]) {
utils.log('Load item ', lastCode.id);