瀏覽代碼

options validation wip

sanex3339 9 年之前
父節點
當前提交
eed641fac5
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      dist/index.js
  2. 1 1
      src/Options.ts

+ 1 - 1
dist/index.js

@@ -1079,7 +1079,7 @@ var DefaultPreset_1 = __webpack_require__(16);
 var Options = function Options(obfuscatorOptions) {
     _classCallCheck(this, Options);
 
-    this.schema = Joi.object().keys({
+    this.schema = Joi.object({
         compact: Joi.boolean(),
         debugProtection: Joi.boolean(),
         debugProtectionInterval: Joi.boolean(),

+ 1 - 1
src/Options.ts

@@ -76,7 +76,7 @@ export class Options implements IOptions {
     /**
      * @type {ObjectSchema}
      */
-    private schema: Joi.ObjectSchema = Joi.object().keys({
+    private schema: Joi.ObjectSchema = Joi.object({
         compact: Joi.boolean(),
         debugProtection: Joi.boolean(),
         debugProtectionInterval: Joi.boolean(),