parent
ae41a78d3c
commit
3ec91a8d8a
1 changed files with 3 additions and 2 deletions
|
|
@ -567,8 +567,9 @@ class Language {
|
|||
static load(url) {
|
||||
let bytes;
|
||||
if (
|
||||
typeof require === 'function' &&
|
||||
require('url').parse(url).protocol == null
|
||||
typeof process !== 'undefined' &&
|
||||
process.versions &&
|
||||
process.versions.node
|
||||
) {
|
||||
const fs = require('fs');
|
||||
bytes = Promise.resolve(fs.readFileSync(url));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue