Typeahead.js: Clears LocalStorage on load

Created on 29 Apr 2016  路  2Comments  路  Source: twitter/typeahead.js

The moment when I require the Bloodhound JS library (v 1.2.1) on my page with,
var Bloodhound = require('bloodhound-js');
the localstorage is wiped clean. I am storing some values there so right now I have a work-around in place where I read all the values, require Bloodhound, and then write them back to localstorage.

This is not a very nice solution though, so I was wondering if there is anyway to make Bloodhound not clear the Localstorage on load.

http://stackoverflow.com/questions/36931826/bloodhound-js-clears-localstorage-on-load

Most helpful comment

This issue is related to an issue in this localStorage library:
https://github.com/pqx/storage2/issues/1

Bloodhound should remove its dependency on this library, since it has this ridiculous flaw.

All 2 comments

+1 for this

This issue is related to an issue in this localStorage library:
https://github.com/pqx/storage2/issues/1

Bloodhound should remove its dependency on this library, since it has this ridiculous flaw.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

svlcomyoo picture svlcomyoo  路  4Comments

steswinbank picture steswinbank  路  5Comments

agborkowski picture agborkowski  路  5Comments

viktor-rachuk picture viktor-rachuk  路  3Comments

digitalpenguin picture digitalpenguin  路  4Comments