From 7919333fc5694303a77aecc2c20c175514b082fd Mon Sep 17 00:00:00 2001 From: guocaoyi Date: Thu, 18 Apr 2019 15:20:02 +0800 Subject: [PATCH] warnfix(gitbook v3.*):update gitbook version validation --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a0a6b05..355e5af 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ function getConfig(context, property, defaultValue) { function isEbook(book) { // 2.x - if (book.options && book.options.generator) { + if (/^2+\.\d+\.\d+$/.test(book.gitbook.version)) { return book.options.generator === 'ebook'; }