File size: 161 Bytes
2606dde
 
b7b2c8c
 
1
2
3
4
5
import type { Model } from "$lib/types/Model";

export const findCurrentModel = (models: Model[], id?: string) =>
	models.find((m) => m.id === id) ?? models[0];