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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user