Skip to content
Snippets Groups Projects
Verified Commit ea2ae9c6 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Avoid direct searches if no data is loaded

parent e74cb218
Branches
Tags
No related merge requests found
Pipeline #5445 passed
......@@ -95,7 +95,7 @@ module Passwordstate
def get(id, query = {})
raise 'Operation not supported' unless operation_supported?(:get)
if query.empty?
if query.empty? && !entries.empty?
existing = entries.find do |entry|
entry.send(entry.class.index_field) == id
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment