<commit_before>import WinJSRocks from "winjsrocks";
import IndexDBStorage from "../provider/indexeddb-storage"

export default class extends WinJSRocks.Plugin.Base {
  constructor(application) {
    super(application);
  }

  setup(options, callback) {
    var that = this;
    return super.setup(options, function(err) {
      if (err)
        return callback(err);

      providerKey = options.storage.provider || "indexeddb";
      switch (providerKey) {
        case "indexeddb":
          that.application.builder.registerProvider("winjsrocks-local-storage", IndexDBStorage);
          break;
      }

      return callback();
    })
  }
};<commit_msg>Bugfix for null provider options<commit_after>import WinJSRocks from "winjsrocks";
import IndexDBStorage from "../provider/indexeddb-storage"

export default class extends WinJSRocks.Plugin.Base {
  constructor(application) {
    super(application);
  }

  setup(options, callback) {
    var that = this;
    options = options || {}
    options.storage = options.storage || {} 
    return super.setup(options, function(err) {
      if (err)
        return callback(err);

      providerKey = options.storage.provider || "indexeddb";
      switch (providerKey) {
        case "indexeddb":
          that.application.builder.registerProvider("winjsrocks-local-storage", IndexDBStorage);
          break;
      }

      return callback();
    })
  }
};
{'fraction_non_alphanumeric': 0.11522048364153627, 'fraction_numerical': 0.0, 'mean_word_length': 3.066473988439306, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '621540', 'n_tokens_mistral': 402, 'n_tokens_neox': 393, 'n_words': 86}