diff --git a/live-view/live-view.js b/live-view/live-view.js index 9363661bff..2abda80a6f 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -1062,9 +1062,10 @@ async function handleLiveViewRequest(requestPath) { // if file is over 1MB - if (resp.errors && resp.errors.length > 0 && resp.errors[0].code === 'too_large') { + if ((resp.errors && resp.errors.length > 0 && resp.errors[0].code === 'too_large') || + (resp.size && resp.size >= 1000000 && resp.content === '')) { - console.log('[Live view] File', fileName, 'over 1MB, fetching from blob API'); + // console.log('[Live view] File', fileName, 'over 1MB, fetching from blob API'); // fetch file directory const dirResp = await git.getItems(liveFileDir); diff --git a/service-worker.js b/service-worker.js index 239e04d5b0..e429a96ba0 100644 --- a/service-worker.js +++ b/service-worker.js @@ -1,6 +1,6 @@ // update worker name when updating cached files -const WORKER_NAME = 'codeit-worker-v770'; +const WORKER_NAME = 'codeit-worker-v771'; self.importScripts('/worker/client-channel.js');