Skip to content

Commit 9f28379

Browse files
Gitta MarancsikGitta Marancsik
authored andcommitted
Dynamicform undo bug introduced in dc90710
1 parent e3f7515 commit 9f28379

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/controls/dynamicForm/DynamicForm.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ export class DynamicForm extends React.Component<IDynamicFormProps, IDynamicForm
238238

239239
}
240240
// Otherwise, depending on the content type ID of the item, if any, we need to behave accordingly
241-
else if (contentTypeId === undefined || contentTypeId === '') {
242-
if (!contentTypeId.startsWith('0x0120')) {
241+
else if (contentTypeId === undefined || contentTypeId === '' || !contentTypeId.startsWith('0x0120')) {
243242
// We are adding a new list item
244243
try {
245244
const iar = await sp.web.lists.getById(listId).items.add(objects);
@@ -288,7 +287,6 @@ export class DynamicForm extends React.Component<IDynamicFormProps, IDynamicForm
288287
}
289288
console.log("Error", error);
290289
}
291-
}
292290
}
293291

294292
this.setState({

0 commit comments

Comments
 (0)