File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -149,20 +149,21 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
149
149
}
150
150
151
151
private async onLoadHistoryFromDoc ( event : OpenDocEvent ) {
152
- const doc = event . detail . doc ;
153
-
154
- Array . from (
155
- doc . querySelectorAll ( ':root > Header > History > Hitem' )
156
- ) . forEach ( historyItem => {
157
- this . history . push (
158
- this . createSclHistoryEntry (
159
- historyItem . getAttribute ( 'who' ) ,
160
- historyItem . getAttribute ( 'what' ) ,
161
- historyItem . getAttribute ( 'why' ) ,
162
- historyItem . getAttribute ( 'when' )
163
- )
164
- ) ;
165
- } ) ;
152
+ if ( event . detail && event . detail . doc ) {
153
+ const doc = event . detail . doc ;
154
+ Array . from (
155
+ doc . querySelectorAll ( ':root > Header > History > Hitem' )
156
+ ) . forEach ( historyItem => {
157
+ this . history . push (
158
+ this . createSclHistoryEntry (
159
+ historyItem . getAttribute ( 'who' ) ,
160
+ historyItem . getAttribute ( 'what' ) ,
161
+ historyItem . getAttribute ( 'why' ) ,
162
+ historyItem . getAttribute ( 'when' )
163
+ )
164
+ ) ;
165
+ } ) ;
166
+ }
166
167
}
167
168
168
169
private onIssue ( de : IssueEvent ) : void {
You can’t perform that action at this time.
0 commit comments