Skip to content

Commit e3c0e38

Browse files
committed
fix: dont show overlays for non html file types
1 parent fa079da commit e3c0e38

File tree

1 file changed

+7
-0
lines changed
  • src/extensionsIntegrated/Phoenix-live-preview

1 file changed

+7
-0
lines changed

src/extensionsIntegrated/Phoenix-live-preview/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ define(function (require, exports, module) {
213213
return;
214214
}
215215

216+
// we dont show the overlays for non HTML-type files
217+
const currentDocument = DocumentManager.getCurrentDocument();
218+
if (!currentDocument || !currentDocument.file) { return; }
219+
220+
const filePath = currentDocument.file.fullPath;
221+
if (!utils.isHTMLFile(filePath)) { return; }
222+
216223
// to not show the overlays if user has already closed it before
217224
if(status === MultiBrowserLiveDev.STATUS_CONNECTING && !shouldShowConnectingOverlay) { return; }
218225
if(status === MultiBrowserLiveDev.STATUS_SYNC_ERROR && !shouldShowSyncErrorOverlay) { return; }

0 commit comments

Comments
 (0)