Skip to content

Commit 8fb4757

Browse files
committed
Changes while testing and reviewing
1 parent 9158487 commit 8fb4757

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/Line/Line.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export default class Line {
8383
if (existingLine && !hasAnnotationChanges(existingLine, lineAsAnnotation)) {
8484
return this // Return without versioning
8585
}
86-
86+
const action = this.#tinyAction === 'create' ? 'save' : this.#tinyAction
8787
const updatedLine = existingLine ? { ...existingLine, ...lineAsAnnotation } : lineAsAnnotation
88-
const newURI = await databaseTiny[this.#tinyAction](updatedLine).then(res => res.id)
88+
const newURI = await databaseTiny[action](updatedLine).then(res => res.id)
8989
.catch(err => {
9090
throw new Error(`Failed to update Line in RERUM: ${err.message}`)
9191
})

0 commit comments

Comments
 (0)