* Merging revisions 915 from trunk:

------------------------------------------------------------------------
    r915 | michael | 2020-11-05 09:34:37 +0100 (Thu, 05 Nov 2020) | 1 line
    
    * Avoid returning undefined when getting field data
    ------------------------------------------------------------------------
This commit is contained in:
michael 2020-11-05 08:36:25 +00:00
commit 3091868cf5
2 changed files with 8 additions and 0 deletions

View File

@ -3162,6 +3162,8 @@ function TDataSet.GetFieldData(Field: TField; Buffer: TDatarecord): JSValue;
begin
Result:=TJSObject(buffer.data).Properties[Field.FieldName];
if isUndefined(Result) then
Result:=Null;
end;
@ -5563,7 +5565,11 @@ begin
If FValidating then
result:=FValueBuffer
else
begin
Result:=FDataset.GetFieldData(Self);
If IsUndefined(Result) then
Result:=Null;
end;
end;
function TField.GetDataSize: Integer;

View File

@ -1698,6 +1698,8 @@ begin
R:=Buffer.data;
end;
Result:=FFieldMapper.GetJSONDataForField(Field,R);
if isUndefined(Result) then
Result:=Null;
end;
procedure TBaseJSONDataSet.SetFieldData(Field: TField; var Buffer: TDatarecord; AValue : JSValue);