@@ -5,9 +5,14 @@ export const getSchemaEntries = (schema: Schema) => {
55 const schema_entries = Object . entries ( schema ) ,
66 category_schema_entry = schema_entries . find (
77 ( [ , schema_entry_value ] ) =>
8- schema_entry_value . type === 'multi_select ' &&
8+ schema_entry_value . type === 'select ' &&
99 schema_entry_value . name === 'Category'
1010 ) as [ string , MultiSelectSchemaUnit ] ,
11+ name_schema_entry = schema_entries . find (
12+ ( [ , schema_entry_value ] ) =>
13+ schema_entry_value . type === 'title' &&
14+ schema_entry_value . name === 'Name'
15+ ) as [ string , MultiSelectSchemaUnit ] ,
1116 color_schema_entry = schema_entries . find (
1217 ( [ , schema_entry_value ] ) =>
1318 schema_entry_value . type === 'text' &&
@@ -22,5 +27,13 @@ export const getSchemaEntries = (schema: Schema) => {
2227 core . setFailed (
2328 "Couldn't find Color named text type column in the database"
2429 ) ;
25- return [ category_schema_entry , color_schema_entry ] as const ;
30+ if ( ! name_schema_entry )
31+ core . setFailed (
32+ "Couldn't find Name named title type column in the database"
33+ ) ;
34+ return [
35+ category_schema_entry ,
36+ color_schema_entry ,
37+ name_schema_entry
38+ ] as const ;
2639} ;
0 commit comments