Skip to content

Commit

Permalink
fix(rules): correct removal of 'id' field from Rule object (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores authored Mar 11, 2024
1 parent 947a706 commit 0e0e29d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/Rules/RulesUploadModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const parseRule = (file: File): Observable<Rule> => {
return from(
file.text().then((content) => {
const obj = JSON.parse(content);
if (obj.id) {
obj.remove('id');
if (obj.id !== undefined) {
delete obj.id;
}
if (isRule(obj)) {
return obj;
Expand Down

0 comments on commit 0e0e29d

Please sign in to comment.