Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick fix for #586. A more durable solution is inbound #634

Merged
merged 1 commit into from Dec 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/ide.ts
Expand Up @@ -2130,6 +2130,14 @@ export class IDE {

let md = this.editor.toMarkdown();

// @NOTE: We sync this here to prevent a terrible reload bug that occurs when saving to the file system.
// This isn't really the right fix, but it's a quick one that helps prevent lost work in trivial cases
// like navigating the workspace.
// @TODO: This logic needs ripped out entirely and replaced with a saner abstraction that keeps the
// file system and workspace in sync.
// @TODO: localStorage also needs to get synced and cleared lest it permanently overrule other sources of truth.
this._fileCache[this.documentId] = md;

// if we're not local, we notify the outside world that we're trying
// to save
if(!this.local) {
Expand Down