提交 e26db506 编写于 作者: M Matt Bierner

Mark that state may be undefined

上级 b185e5b7
......@@ -230,7 +230,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
if (!webview || webview.isDisposed()) {
return;
}
(webview as WebviewEditorInput<MainThreadWebviewState>).state.state = newState;
(webview as WebviewEditorInput<MainThreadWebviewState>).state!.state = newState;
}
};
}
......
......@@ -70,7 +70,7 @@ export class WebviewEditorInput<State = any> extends EditorInput {
private readonly _webviewDisposables = this._register(new DisposableStore());
private _group?: GroupIdentifier;
private _scrollYPercentage: number = 0;
private _state: State;
private _state: State | undefined;
public readonly extension?: {
readonly location: URI;
......@@ -178,11 +178,11 @@ export class WebviewEditorInput<State = any> extends EditorInput {
}
}
public get state(): State {
public get state(): State | undefined {
return this._state;
}
public set state(value: State) {
public set state(value: State | undefined) {
this._state = value;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册