-
Notifications
You must be signed in to change notification settings - Fork 109
[stable25] Fix direct editing loading of txt files #3479
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,12 +95,10 @@ class SyncService { | |
| document: this.document, | ||
| session: this.session, | ||
| }) | ||
| const content = connectionData.content | ||
| || await this._fetchDocument() | ||
| this.emit('loaded', { | ||
| document: this.document, | ||
| session: this.session, | ||
| documentSource: '' + content, | ||
| documentSource: '' + connectionData.content, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor nitpick, but could we just cast it? documentSource: String(connectionData.content)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nevermind, this is already a backport 🙈 Approved |
||
| }) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the same thing we removed above? I'm confused. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, which is fine still just without the fetch fallback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main problem was that an empty string (from a file without content) would always trigger the fetch request which is actually not necessary anymore as we always pass the content earlier.