提交 49316a04 编写于 作者: M Matt Bierner

Avoid direct compare with null if we only care that some obj is returned

上级 25ed721e
......@@ -257,7 +257,7 @@ export abstract class CompositeRegistry<T extends Composite> extends Disposable
protected deregisterComposite(id: string): void {
const descriptor = this.compositeById(id);
if (descriptor === null) {
if (!descriptor) {
return;
}
......
......@@ -601,7 +601,7 @@ export class MarkerViewModel extends Disposable {
return Promise.resolve(model);
}
if (waitForModel) {
if (this.modelPromise === null) {
if (!this.modelPromise) {
this.modelPromise = createCancelablePromise(cancellationToken => {
return new Promise((c) => {
this._register(this.modelService.onModelAdded(model => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册