Skip to content

Commit

Permalink
fix(rules): remove id property from uploaded rule (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg authored Feb 6, 2024
1 parent 361483a commit 5a1de2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/Rules/RulesUploadModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ 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 (isRule(obj)) {
return obj;
} else {
Expand Down

0 comments on commit 5a1de2f

Please sign in to comment.