Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/client/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ class Editor extends DataComponent {

window.addEventListener('beforeunload', (event) => {
const isDevMode = NODE_ENV != 'production';
const shouldWarnUser = this.data.document.initiated() && !isDevMode; // dev mode blacklisted so livereload works (for productivity)
const isDemo = doc.secret() === DEMO_SECRET;
const shouldWarnUser = this.data.document.initiated() && !isDemo && !isDevMode; // dev mode blacklisted so livereload works (for productivity)

if (shouldWarnUser) {
event.preventDefault();
Expand Down