3

The moment when I require the Bloodhound JS library (v 1.2.1),

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.

Oskar
  • 1,597
  • 4
  • 19
  • 38

1 Answers1

1

This build has fixed the issue by using a key prefix, so it can selectively clean down.

https://raw.githubusercontent.com/twitter/typeahead.js/master/dist/bloodhound.min.js

PenFold
  • 706
  • 3
  • 20
  • Which version should has this new fix? – Oskar Feb 13 '17 at 11:48
  • 1
    This is a totally separate build from the broken project at http://github.com/pqx/bloodhound. I've used the latest files from the Twitter git hub. I assume that there was a fork in a time long ago. – PenFold Feb 13 '17 at 21:05