Fix crash when using Plain Text (#129)

main
Andrew Dassonville 7 years ago committed by Michael Fix
parent 830828d6c5
commit 921d6b40b2

@ -85,7 +85,8 @@ export const LANGUAGES = [
mode: 'auto'
},
{
name: 'Plain Text'
name: 'Plain Text',
mode: 'text'
},
{
name: 'C',
@ -363,7 +364,9 @@ const unfold = (f, seed) => {
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
const alreadyLoaded = new Set()
LANGUAGES.filter(language => language.mode !== 'auto').forEach(language => {
LANGUAGES.filter(
language => language.mode !== 'auto' && language.mode !== 'text'
).forEach(language => {
if (language.mode && !alreadyLoaded.has(language.mode)) {
alreadyLoaded.add(language.mode)
language.custom

Loading…
Cancel
Save