     } for item in Zotero.Items.get(results))
 
 Zotero.BetterBibTeX.schomd.bibtex = (keys, {translator, format, library, displayOptions} = {}) ->
-  items = Zotero.Items.get(@items(keys, {library: library}))
+  items = @items(keys, {library: library})
+  #Zotero.Items.get doesn't like being passed an empty array
+  items = Zotero.Items.get(items) if items.length > 0
   translator ?= 'betterbiblatex'
   format ?= 'json'
   displayOptions ?= {}

  }
  return

Zotero.BetterBibTeX.schomd.items = (citekeys, {library}) ->
  citekeys = [citekeys] unless Array.isArray(citekeys)
  ids = []
  keys = []

  cp.updateItems(items)
  return (cp.appendCitationCluster({citationItems: [{id:item}], properties:{}}, true)[0][1] for item in items)

Zotero.BetterBibTeX.schomd.bibliography = (citekeys, {style, library} = {}) ->
  items = @items(citekeys, {library: library})
  return '' if items.length == 0

