Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
soggy-mushroom committed Oct 24, 2024
1 parent 39e3e3f commit 6993aa9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/codecs/jats/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1493,12 +1493,12 @@ export function decodeReference(
]
if (identifiers.length === 0) identifiers = undefined

let metaEntries: Record<string,string> = {};
const metaEntries: Record<string, string> = {}
if (datePublishedString !== undefined && datePublishedString.length > 4) {
metaEntries.yearPublished = datePublishedString;
metaEntries.yearPublished = datePublishedString
}
if(typeof label === 'string') {
metaEntries.label = label;
if (typeof label === 'string') {
metaEntries.label = label
}

return stencila.article({
Expand All @@ -1513,9 +1513,7 @@ export function decodeReference(
identifiers,
url,
meta: {
...(metaEntries
? { ...metaEntries }
: {}),
...(metaEntries ? { ...metaEntries } : {}),
...(publicationType
? {
publicationType,
Expand Down

0 comments on commit 6993aa9

Please sign in to comment.