Skip to content

Commit 4761225

Browse files
committed
Fixing a bug with decodeDijitRegistryResult
1 parent 6858552 commit 4761225

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mlapptools.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ function textAlign(uiElement, alignment)
303303
props = jsondecode(win.executeJS(sprintf('Object.keys(W[%d])', ind1-1)));
304304
tmp = mlapptools.emptyStructWithFields(props);
305305
validProps = fieldnames(tmp);
306-
for indP = 1:numel(tmp)
306+
for indP = 1:numel(validProps)
307307
try
308-
tmp.(validProps(indP)) = jsondecode(win.executeJS(sprintf(['W[%d].' props{ind1}], ind1-1)));
308+
tmp.(validProps{indP}) = jsondecode(win.executeJS(sprintf(['W[%d].' props{indP}], ind1-1)));
309309
catch
310310
% Fallback could be executed recursively for all problematic field
311311
% (to keep the most data), but for now do nothing.

0 commit comments

Comments
 (0)