Skip to content

Commit

Permalink
Improve the method to ensure context for each property exists
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinsw committed May 24, 2024
1 parent cdc7d50 commit d435c94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
"leaflet-gesture-handling": "^1.2.2",
"leaflet.path.drag": "^0.0.6",
"mime": "^4.0.1",
"moment": "^2.30.1",
"ro-crate": "^3.3.5"
"ro-crate": "^3.3.8"
},
"peerDependencies": {
"element-plus": "^2.6.0",
Expand Down
4 changes: 1 addition & 3 deletions src/lib/components/EditorState.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,7 @@ export class EditorState {
return;
}
if (def.id && !this.crate.getTerm(def.id)) {
const newDef = {};
newDef[def.name] = def.id;
this.crate.addContext(newDef);
this.crate.addTermDefinition(def.name, def.id);
}
}
}

0 comments on commit d435c94

Please sign in to comment.