Skip to content

Commit

Permalink
registerAE
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Aug 5, 2024
1 parent 9a8ffae commit b9e3658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/test-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class TestSupport {
let name = collectionName
if (name[0] === '/') name = name.substring(1) // don't do full path parsing right now
for (const collection of Zotero.Collections.getByLibrary(Zotero.Libraries.userLibraryID)) {
if (collection.name === name) scope = { type: 'collection', collection: collection.id }
if (collection.name === name) scope = { type: 'collection', collection }
}
if (!scope) throw new Error(`Collection '${ name }' not found`)
}
Expand Down
2 changes: 1 addition & 1 deletion translators/lib/translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export class Translation { // eslint-disable-line @typescript-eslint/naming-conv

// special handling
try {
this.charmap = JSON.parse(this.preferences.charmap)
this.charmap = this.charmap ? JSON.parse(this.preferences.charmap) : {}
}
catch (err) {
log.error('could not parse charmap', err)
Expand Down

0 comments on commit b9e3658

Please sign in to comment.