Commit 9e2da987 authored by Hana Litavská's avatar Hana Litavská
Browse files

webui: fix type check for auto

#62
parent 54f5aef1
Loading
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -24,7 +24,9 @@ export const processCasts = (algorithms: Algorithm[], casts: Casts) => {
}
export const isCastable = (casts: Casts, from: AlibType, to: AlibType) => {
	return [from, to].includes('abstraction::UnspecifiedType') ||
	removeTemplate(from) === removeTemplate(to) ||
	casts[removeTemplate(from)]?.includes(removeTemplate(to))
	return from === 'auto'
		|| to === 'auto'
		|| [from, to].includes('abstraction::UnspecifiedType')
		|| removeTemplate(from) === removeTemplate(to)
		|| casts[removeTemplate(from)]?.includes(removeTemplate(to))
}