Commit 40b6a2e4 authored by Medicean's avatar Medicean

fix windows user encoder parse error

parent 0a1f29ae
......@@ -183,7 +183,7 @@ class Base {
parseEncoder(enc) {
// 加载编码器
// QAQ!我也不知道为什么,如果直接require变量名,babel编译就会warning,so我只好加个`咯~
this['__encoder__'][enc.split(`encoder/`||`encoder\\`)[1]] = require(`${enc}`);
this['__encoder__'][enc.indexOf(`encoder/`) > -1 ? enc.split(`encoder/`)[1]:enc.split(`encoder\\`)[1]] = require(`${enc}`);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment