From cc7562db6e7b1ed1136f24be995937f5a4ab5e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Thu, 14 Jan 2021 13:49:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96toc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/socket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/socket.js b/src/tools/socket.js index c88b582..2f763b7 100644 --- a/src/tools/socket.js +++ b/src/tools/socket.js @@ -140,7 +140,7 @@ module.exports = function(app, createViewWindow) { toc = eb.flow.map((it, i) => { let tmp = dict[it.id] || { level: i === 0 ? i : undefined } - if (!tmp.hasOwnProperty('level')) { + if (tmp.level === undefined) { tmp.level = 1 } if (it.id === 'titlepage') {