修复 auto.setMode()报错的问题

This commit is contained in:
hyb1996
2018-10-15 15:57:13 +08:00
parent a124c732b1
commit d2e0899c8b

View File

@@ -125,7 +125,7 @@ module.exports = function(runtime, global){
} }
auto.setMode = function(modeStr){ auto.setMode = function(modeStr){
if(typeof(mode) !== "string"){ if(typeof(modeStr) !== "string"){
throw new TypeError("mode should be a string"); throw new TypeError("mode should be a string");
} }
let mode = modes[modeStr]; let mode = modes[modeStr];