We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9158487 commit 8fb4757Copy full SHA for 8fb4757
classes/Line/Line.js
@@ -83,9 +83,9 @@ export default class Line {
83
if (existingLine && !hasAnnotationChanges(existingLine, lineAsAnnotation)) {
84
return this // Return without versioning
85
}
86
-
+ const action = this.#tinyAction === 'create' ? 'save' : this.#tinyAction
87
const updatedLine = existingLine ? { ...existingLine, ...lineAsAnnotation } : lineAsAnnotation
88
- const newURI = await databaseTiny[this.#tinyAction](updatedLine).then(res => res.id)
+ const newURI = await databaseTiny[action](updatedLine).then(res => res.id)
89
.catch(err => {
90
throw new Error(`Failed to update Line in RERUM: ${err.message}`)
91
})
0 commit comments