Fix number node rendering

This commit is contained in:
Misode
2020-11-07 12:29:47 +01:00
parent 5b734d317a
commit f0cc6334bf

View File

@@ -141,7 +141,7 @@ export const renderHtml: Hook<[any, Mounter], [string, string, string]> = {
const hex = (value?.toString(16).padStart(6, '0') ?? '000000')
return ['', `<input type="color" data-id="${onChange}" value="#${hex}">`, '']
}
return ['', `<input data-id="${onChange}" value="${value}">`, '']
return ['', `<input data-id="${onChange}" value="${value ?? ''}">`, '']
},
object({ node, getActiveFields, getChildModelPath }, path, value, mounter) {