@@ -152,7 +152,7 @@ export default class ShimoDocumentCabinet extends CabinetBase {
152
152
public initGallery ( editor : ShimoSDK . Document . Editor ) : void {
153
153
const options : ShimoSDK . Document . GalleryOptions = {
154
154
editor,
155
- downloadServer : this . editorOptions . downloadConfig . origin
155
+ downloadServer : this . editorOptions ? .downloadConfig ? .origin || ''
156
156
}
157
157
const gallery : ShimoSDK . Document . Gallery = new this . sdkDocument . plugins . Gallery ( options )
158
158
gallery . render ( )
@@ -179,7 +179,7 @@ export default class ShimoDocumentCabinet extends CabinetBase {
179
179
const historyShowContainer = this . getDom ( 'history-content' )
180
180
history . render ( historyShowContainer )
181
181
182
- const clickDom = this . getDom ( 'ql-history' , null , 'button' )
182
+ const clickDom = this . getDom ( 'ql-history' , undefined , 'button' )
183
183
clickDom . setAttribute ( 'type' , 'button' )
184
184
clickDom . classList . add ( 'ql-history' )
185
185
@@ -194,14 +194,14 @@ export default class ShimoDocumentCabinet extends CabinetBase {
194
194
toolbarContainer . appendChild ( clickDom )
195
195
}
196
196
197
- const historyContainer : HTMLElement = document . querySelector ( '.history-container' )
197
+ const historyContainer : HTMLElement = document . querySelector ( '.history-container' ) as HTMLElement
198
198
199
199
clickDom . addEventListener ( 'click' , ( ) => {
200
200
historyContainer . style . display = 'block'
201
201
editor . comment . hide ( )
202
202
} )
203
203
204
- document . querySelector ( '.history-close-btn' ) . addEventListener ( 'click' , ( ) => {
204
+ document . querySelector ( '.history-close-btn' ) ! . addEventListener ( 'click' , ( ) => {
205
205
historyContainer . style . display = 'none'
206
206
editor . comment . show ( )
207
207
} )
@@ -277,9 +277,9 @@ export default class ShimoDocumentCabinet extends CabinetBase {
277
277
const options : ShimoSDK . Document . UploaderOptions = {
278
278
editor,
279
279
container : '#sm-editor' ,
280
- url : this . editorOptions . uploadConfig . origin ,
281
- accessToken : this . editorOptions . uploadConfig . token ,
282
- type : this . editorOptions . uploadConfig . server
280
+ url : this . editorOptions ? .uploadConfig ? .origin ,
281
+ accessToken : this . editorOptions ? .uploadConfig ? .token ,
282
+ type : this . editorOptions ? .uploadConfig ? .server
283
283
}
284
284
285
285
const uploader : ShimoSDK . Document . Uploader = new this . sdkDocument . plugins . Uploader ( options )
@@ -291,10 +291,10 @@ export default class ShimoDocumentCabinet extends CabinetBase {
291
291
const options : ShimoSDK . Document . ShortcutOptions = {
292
292
editor,
293
293
plugins : {
294
- demoScreen : null ,
294
+ demoScreen : undefined ,
295
295
revision : null ,
296
- history : null ,
297
- tableOfContent : null
296
+ history : undefined ,
297
+ tableOfContent : undefined
298
298
}
299
299
}
300
300
0 commit comments