import {matchesSavedMap, sortMaps} from '../utils';
import PrefixStorage from './PrefixStorage';

class Storage extends PrefixStorage{
  PREFIX = 'map='

  get(url) {
    return super.getAll().then(maps => {
      const sorted = sortMaps(Object.keys(maps).map(key => maps[key]));
      // Sorts by domain length, then by path length
      return sorted.find(matchesSavedMap.bind(null, url)) || {};
    });
 }

}

export default new Storage();

@@ -97,16 +97,20 @@
 %0A%0Aclass 
+Host
 Storage 
@@ -429,16 +429,20 @@
 ult new 
+Host
 Storage(

Use correct class name for HostStorage