@xuda.io/xuda-worker-bundle-min 1.3.323 → 1.3.324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +16 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1781,8 +1781,6 @@ func.datasource.execute = async function (
|
|
|
1781
1781
|
break;
|
|
1782
1782
|
}
|
|
1783
1783
|
case "url": {
|
|
1784
|
-
debugger;
|
|
1785
|
-
|
|
1786
1784
|
let opt = {
|
|
1787
1785
|
method: prog_obj.progDataSource.dataSourceMethod || "POST",
|
|
1788
1786
|
headers: {
|
|
@@ -1809,6 +1807,14 @@ func.datasource.execute = async function (
|
|
|
1809
1807
|
const json = await response.json();
|
|
1810
1808
|
return json.data;
|
|
1811
1809
|
} catch (err) {
|
|
1810
|
+
func.utils.debug_report(
|
|
1811
|
+
SESSION_ID,
|
|
1812
|
+
"Data source",
|
|
1813
|
+
err.message +
|
|
1814
|
+
" https://" +
|
|
1815
|
+
prog_obj.progDataSource.dataSourceDataUrl,
|
|
1816
|
+
"E"
|
|
1817
|
+
);
|
|
1812
1818
|
return null;
|
|
1813
1819
|
}
|
|
1814
1820
|
|
|
@@ -1961,6 +1967,10 @@ func.datasource.execute = async function (
|
|
|
1961
1967
|
case "array": {
|
|
1962
1968
|
let data = await get_data_from_source();
|
|
1963
1969
|
|
|
1970
|
+
if (data === null) {
|
|
1971
|
+
data = [];
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1964
1974
|
if (!_ds.v.raw_data) {
|
|
1965
1975
|
_ds.v.raw_data = { rows: [] };
|
|
1966
1976
|
}
|
|
@@ -1974,7 +1984,10 @@ func.datasource.execute = async function (
|
|
|
1974
1984
|
|
|
1975
1985
|
case "json": {
|
|
1976
1986
|
let data = await get_data_from_source();
|
|
1977
|
-
|
|
1987
|
+
if (data === null) {
|
|
1988
|
+
data = [];
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1978
1991
|
if (!_ds.v.raw_data) {
|
|
1979
1992
|
_ds.v.raw_data = { rows: [] };
|
|
1980
1993
|
}
|