Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Fix for Safari v3 - index.js #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/runtime/web/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './polyfill';
import '../../intl/polyfill';
import { prioritizeLocales } from '../../intl/locale';
import { prioritizeLocales,PrioritizeLocales } from '../../intl/locale';

import { ContentLocalizationObserver } from '../../lib/observer/content';
import { HTMLLocalization } from '../../lib/dom/html';
Expand All @@ -25,7 +25,10 @@ documentReady().then(() => {
});

function createLocalization(name, resIds, defaultLang, availableLangs) {
function requestBundles(requestedLangs = new Set(navigator.languages)) {
let langs = PrioritizeLocales(availableLangs,navigator.languages.slice(),
defaultLang);

function requestBundles(requestedLangs = new Set(langs)) {
const newLangs = prioritizeLocales(
defaultLang, availableLangs, requestedLangs
);
Expand Down