Skip to content

Commit

Permalink
Switch patchDocument from task to enqueueTask (#454)
Browse files Browse the repository at this point in the history
Switch `patch` to enqueueTask
  • Loading branch information
jeffdaley authored Nov 28, 2023
1 parent 658f624 commit ad28608
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app/components/document/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { action } from "@ember/object";
import { getOwner } from "@ember/application";
import { inject as service } from "@ember/service";
import {
enqueueTask,
keepLatestTask,
restartableTask,
task,
Expand Down Expand Up @@ -648,7 +649,7 @@ export default class DocumentSidebarComponent extends Component<DocumentSidebarC
},
);

patchDocument = task(async (fields) => {
patchDocument = enqueueTask(async (fields) => {
const endpoint = this.isDraft ? "drafts" : "documents";

try {
Expand Down

0 comments on commit ad28608

Please sign in to comment.