Skip to content

Commit

Permalink
Make NcMethodResultLength value nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
cristian-recoseanu committed Aug 1, 2023
1 parent b0eed07 commit 2321a0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/src/NCModel/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ export abstract class NcObject
{
case '1p7':
{
let length = this.touchpoints?.length ?? 0;
let length = this.touchpoints?.length ?? null;

return new CommandResponseWithValue(handle, NcMethodStatus.OK, length);
}
case '1p8':
{
let length = this.runtimePropertyConstraints?.length ?? 0;
let length = this.runtimePropertyConstraints?.length ?? null;

return new CommandResponseWithValue(handle, NcMethodStatus.OK, length);
}
Expand Down Expand Up @@ -626,11 +626,11 @@ export class NcMethodResultId extends NcMethodResult

export class NcMethodResultLength extends NcMethodResult
{
public value: number;
public value: number | null;

public constructor(
status: NcMethodStatus,
value: number)
value: number | null)
{
super(status);

Expand All @@ -640,7 +640,7 @@ export class NcMethodResultLength extends NcMethodResult
public static override GetTypeDescriptor(includeInherited: boolean): NcDatatypeDescriptor
{
let currentClassDescriptor = new NcDatatypeDescriptorStruct("NcMethodResultLength", [
new NcFieldDescriptor("value", "NcUint32", false, false, null, "Length result value")
new NcFieldDescriptor("value", "NcUint32", true, false, null, "Length result value")
], "NcMethodResult", null, "Length method result")

if(includeInherited)
Expand Down

0 comments on commit 2321a0d

Please sign in to comment.