Skip to content

Commit

Permalink
don't generated markdown citation for missing items
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Jun 10, 2015
1 parent 3fe51d9 commit 78bdc33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion chrome/content/zotero-better-bibtex/keymanager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,5 @@ Zotero.BetterBibTeX.keymanager = new class

resolved = {}
for citekey in citekeys
Zotero.BetterBibTeX.debug('resolve:', {citekey, libraryID}, 'against', @keys.find())
resolved[citekey] = @keys.findObject({citekey, libraryID})
return resolved
4 changes: 2 additions & 2 deletions chrome/content/zotero-better-bibtex/schomd.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ Zotero.BetterBibTeX.schomd.items = (citekeys, {library} = {}) ->
else
resolved = Zotero.BetterBibTeX.keymanager.resolve(keys, library)

return ((if typeof key == 'number' then key else resolved[key]) for key in citekeys)
return ((if typeof key == 'number' then key else resolved[key].itemID) for key in citekeys)

Zotero.BetterBibTeX.schomd.citation = (citekeys, {style, library} = {}) ->
items = @items(citekeys, {library: library})
items = (item for item in @items(citekeys, {library}) when item)

return '' if items.length == 0

Expand Down

0 comments on commit 78bdc33

Please sign in to comment.