Skip to content

Commit

Permalink
Fixing pnp#1733 for non-standard cases
Browse files Browse the repository at this point in the history
A possible fix for pnp#1733 when the data gets returned in a non-standard way.
  • Loading branch information
IRRDC committed Jan 24, 2024
1 parent d58bb93 commit abd19d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controls/dynamicForm/DynamicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,10 @@ export class DynamicForm extends React.Component<
hiddenName = field.HiddenListInternalName;
termSetId = field.TermSetId;
anchorId = field.AnchorId;
if (item && item[field.InternalName] && item[field.InternalName].hasOwnProperty('__metadata') && item[field.InternalName].hasOwnProperty('results')) {
// Some combinations of included packages cause the returned data to be placed in a 'results' sub-property after compilation.
item[field.InternalName] = item[field.InternalName]['results'];
}
if (item && item[field.InternalName]) {
item[field.InternalName].forEach((element) => {
selectedTags.push({
Expand Down

0 comments on commit abd19d1

Please sign in to comment.