diff --git a/packages/editor/src/components/materials/MaterialEditor.tsx b/packages/editor/src/components/materials/MaterialEditor.tsx
index c126ac1fd3..d2b1d6b253 100644
--- a/packages/editor/src/components/materials/MaterialEditor.tsx
+++ b/packages/editor/src/components/materials/MaterialEditor.tsx
@@ -146,6 +146,7 @@ export function MaterialEditor(props: { materialUUID: EntityUUID }) {
prototypeName.set(material.type)
const parameters = useHookstate(0)
+
return (
@@ -186,7 +187,7 @@ export function MaterialEditor(props: { materialUUID: EntityUUID }) {
values={materialComponent.parameters.value!}
onChange={(k) => async (val) => {
let prop
- if (prototype.prototypeArguments![k].type === 'texture' && typeof val === 'string') {
+ if (prototype.prototypeArguments[k].type.value === 'texture') {
if (val) {
const priorUnload = textureUnloadMap.get(NO_PROXY)[k]
if (priorUnload) {
@@ -232,7 +233,7 @@ export function MaterialEditor(props: { materialUUID: EntityUUID }) {