neurotech / pocket-dimension

A tiny place to store tiny things.
MIT License
1 stars 1 forks source link

Currently throws if language is undetectable #37

Closed KoryNunn closed 5 years ago

KoryNunn commented 5 years ago

This line throws when it can't detect the language: https://github.com/neurotech/pocket-dimension/blob/master/src/syntax/index.js#L8

Example message body that breaks this:

"watch": "watchify -d index.js -o index.browser.js",
"serve": "static ./",
"start": "npm-run-all --parallel watch serve"
KoryNunn commented 5 years ago

In this case, lang is undefined, and therefore does not trigger the below:

    if (lang === "") {
      lang = "plaintext"
    }