Skip to content

Commit 12ee0ca

Browse files
stevegoltonGerrit Code Review
authored and
Gerrit Code Review
committed
Merge "ui: Fix crash when saving tracks which dont exist in the workspace" into main
2 parents 6db6854 + e20d0be commit 12ee0ca

File tree

1 file changed

+2
-3
lines changed
  • ui/src/plugins/dev.perfetto.RestorePinnedTracks

1 file changed

+2
-3
lines changed

ui/src/plugins/dev.perfetto.RestorePinnedTracks/index.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {Trace} from '../../public/trace';
1717
import {PerfettoPlugin} from '../../public/plugin';
1818
import {Track} from '../../public/track';
1919
import {z} from 'zod';
20-
import {assertExists, assertIsInstance} from '../../base/logging';
20+
import {assertIsInstance} from '../../base/logging';
2121

2222
const PLUGIN_ID = 'dev.perfetto.RestorePinnedTrack';
2323
const SAVED_TRACKS_KEY = `${PLUGIN_ID}#savedPerfettoTracks`;
@@ -184,8 +184,7 @@ export default class implements PerfettoPlugin {
184184
private getCurrentPinnedTracks() {
185185
const res = [];
186186
for (const track of this.ctx.workspace.pinnedTracks) {
187-
const actual = this.ctx.workspace.getTrackByUri(assertExists(track.uri));
188-
res.push(this.toSavedTrack(assertExists(actual)));
187+
res.push(this.toSavedTrack(track));
189188
}
190189
return res;
191190
}

0 commit comments

Comments
 (0)