Skip to content

Commit

Permalink
fix: avoid double array assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzwa committed Apr 27, 2023
1 parent 8b9d504 commit 708fff7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/store/printers.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ export const usePrintersStore = defineStore("Printers", {
if (viewedPrinterId) {
this.sideNavPrinter = printers.find((p) => p.id === viewedPrinterId);
}
this.printers = printers;
this.printers.sort((a: Printer, b: Printer) =>
this.printers = printers.sort((a: Printer, b: Printer) =>
a.printerName?.toLowerCase()?.localeCompare(b?.printerName?.toLowerCase()) ? 1 : -1
);
},
Expand Down

0 comments on commit 708fff7

Please sign in to comment.