From 0d4dbe77bc8ca9bdaacf9cc093dd3f7392aaa26c Mon Sep 17 00:00:00 2001 From: ehennestad Date: Fri, 6 Mar 2026 13:56:44 +0100 Subject: [PATCH] Update getSchemaName.m Remove concatenation of structs. Structs might have different fields, and the concatenation would fail. Only need name and potentially label, so explicitly get these instead of relying on struct concatenation --- code/internal/+openminds/+internal/+vocab/getSchemaName.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/internal/+openminds/+internal/+vocab/getSchemaName.m b/code/internal/+openminds/+internal/+vocab/getSchemaName.m index c9130968..e10bf6d6 100644 --- a/code/internal/+openminds/+internal/+vocab/getSchemaName.m +++ b/code/internal/+openminds/+internal/+vocab/getSchemaName.m @@ -24,14 +24,12 @@ end C = struct2cell(typesVocab); - S = [C{:}]; - - allNames = {S.name}; + allNames = cellfun(@(c) string(c.name), C); isMatch = strcmpi(allNames, nameAlias); if ~any(isMatch) - allLabels = {S.label}; + allLabels = cellfun(@(c) string(c.label), C); isMatch = strcmpi(allLabels, nameAlias); end