Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ export class BeansEntityHandler {
}

let entity = this.getBeansEntity();
if (!entity) {
entity = this.createBeansEntity();
}
entity ??= this.createBeansEntity();
if (entity) {
entity.parent.beans = model;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export const PipeErrorHandlerPage: FunctionComponent = () => {
(model: Record<string, unknown>) => {
if (Object.keys(model).length > 0) {
let entity = pipeResource.getErrorHandlerEntity();
if (!entity) {
entity = pipeResource.createErrorHandlerEntity();
}
entity ??= pipeResource.createErrorHandlerEntity();
entity.parent.errorHandler = model;
} else {
pipeResource!.deleteErrorHandlerEntity();
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/src/utils/event-notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export class EventNotifier extends EventTarget {
private static instance: EventNotifier | undefined;

static getInstance(): EventNotifier {
if (!this.instance) {
this.instance = new EventNotifier();
}
this.instance ??= new EventNotifier();

return this.instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export class DefaultExtensionDeserializer implements ExtensionDeserializer {
// elements or the attributes

let metaInfoMap = schemaObject.getMetaInfoMap();
if (metaInfoMap == null) {
Comment thread
lhein marked this conversation as resolved.
metaInfoMap = new Map<string, object>();
}
metaInfoMap ??= new Map<string, object>();

if (node.nodeType == Node.ATTRIBUTE_NODE) {
let attribMap: Map<QName, Node>;
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/src/xml-schema-ts/utils/NodeNamespaceContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export class NodeNamespaceContext implements NamespacePrefixList {
}

getDeclaredPrefixes(): string[] {
if (this.prefixes === undefined) {
this.prefixes = Object.keys(this.declarations);
}
this.prefixes ??= Object.keys(this.declarations);
return this.prefixes;
}

Expand Down
Loading