Skip to content

Commit 2650617

Browse files
committed
Don't use non-null-assertion
1 parent 6f12200 commit 2650617

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libs/language-server/src/lib/ast/wrappers/typed-object/block-type-wrapper.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ export class BlockTypeWrapper extends TypedObjectWrapper<ReferenceableBlockTypeD
7777
wrapperFactories,
7878
);
7979
if (!ERROR_TYPEGUARD(defaultValue)) {
80-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
81-
properties[property.name]!.defaultValue = defaultValue;
80+
const propertySpec = properties[property.name];
81+
assert(propertySpec !== undefined);
82+
propertySpec.defaultValue = defaultValue;
83+
properties[property.name] = propertySpec;
8284
}
8385
}
8486
}

0 commit comments

Comments
 (0)