minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-02-22 09:18:37 +03:00
parent 01cc2c2726
commit 60850313ed

View File

@ -322,7 +322,13 @@ var BaseBrowserPrototype = {
// item id... // item id...
// XXX revise id generation... // XXX revise id generation...
// XXX these should include the path... (???) // XXX these should include the path... (???)
var key = opts.id || JSON.stringify(value) var key = opts.id
// value is a browser -> generate an unique id...
// XXX identify via API...
// XXX do a better id
|| (value instanceof Browser
&& Date.now())
|| JSON.stringify(value)
// no duplicate keys... // no duplicate keys...
if(key in new_index){ if(key in new_index){