mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-05 04:47:32 +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 => {
|
db.getSettings(defaultSettings).then(result => {
|
||||||
if (result.preserveLastCode && lastCode) {
|
if (result.preserveLastCode && lastCode) {
|
||||||
unsavedEditCount = 0;
|
unsavedEditCount = 0;
|
||||||
if (lastCode.id) {
|
// For web app environment we don't fetch item from localStorage,
|
||||||
// Ignore for remote db
|
// because the item isn't stored in the localStorage.
|
||||||
|
if (lastCode.id && window.IS_EXTENSION) {
|
||||||
db.local.get(lastCode.id, function(itemResult) {
|
db.local.get(lastCode.id, function(itemResult) {
|
||||||
if (itemResult[lastCode.id]) {
|
if (itemResult[lastCode.id]) {
|
||||||
utils.log('Load item ', lastCode.id);
|
utils.log('Load item ', lastCode.id);
|
||||||
|
Reference in New Issue
Block a user