code: function createHeadContextWith(createContext, bundles) {
    const [bundle] = bundles;
  
    if (!bundle) {
      return Promise.resolve(null);
    }
  
    return bundle.fetch().then(resources => {
      const ctx = createContext(bundle.lang);
      resources
        // Filter out resources which failed to load correctly (e.g. 404).
        .filter(res => res !== null)
        .forEach(res => ctx.addMessages(res));
      // Save the reference to the context.
      contexts.set(bundle, ctx);
      return ctx;
    });
  }
docs: Create a `MessageContext` for the first bundle in the fallback chain.
  
  Fetches the bundle's resources and creates a context from them.
  
  @param   {Array<ResourceBundle>} bundle
  @param   {Function}              createContext
  @returns {Promise<MessageContext>}
  @private