File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ class Topbar {
108108 if ( vipInfo . code === 0 ) {
109109 const docCheck = this . checkDocId ( )
110110 if ( docCheck . flag ) {
111- const docInfo = await this . shareService . getSharedDocInfo ( docCheck . docId )
111+ const docInfo = await this . shareService . getSharedDocInfo ( docCheck . docId , cfg ?. serviceApiConfig ?. token ?? "" )
112112 const isShared = docInfo . code === 0
113113 const shareData = docInfo ?. data ? JSON . parse ( docInfo . data ) : null
114114 if ( shareData ) {
Original file line number Diff line number Diff line change @@ -86,8 +86,14 @@ class AttrUtils {
8686
8787 // 处理每个字段
8888 fieldMappings . forEach ( ( { objectKey, settingKey, isNumber } ) => {
89+ // 首先检查 from 是否存在
90+ if ( ! from || typeof from !== "object" ) {
91+ attrs [ settingKey ] = ""
92+ return attrs
93+ }
8994 // 1. 获取原始值(直接从接口键名获取)
90- const value = from [ objectKey ]
95+ // const value = from[objectKey]
96+ const value = Object . prototype . hasOwnProperty . call ( from , objectKey ) ? from [ objectKey ] : undefined
9197
9298 // 2. 验证逻辑(完全拆解版)
9399 // 2.1 检查值是否已定义
You can’t perform that action at this time.
0 commit comments