I'm getting an "Out of stack space" exception on a datasource call when upgrading Kendo from v2016.1.412 to v2017.2.504 (jQuery 1.12.3, AngularJS 1.6.2). Everything works kosher on the previous version, but on upgrade, the following line causes the exception: $scope.tree.setDataSource(ds);. It bombs out before the data call is ever made, which is successful.
Here is the datasource:
01.
Factory.getOrgDS =
function
() {
02.
var
ds =
new
kendo.data.HierarchicalDataSource({
03.
transport: {
04.
read:
function
(e) {
05.
$http.post(env.baseUrl +
'/TreeView/GetTreeData'
, {
06.
maxLevelEntity: groatSession.maxLevel, year: helper.getFiscalYear(), branch: groatSession.branch
07.
}).then(
function
(response) {
08.
var
orgs = response.data;
09.
10.
//remove air force clinics
11.
for
(
var
i = 0; i < orgs.length; i++) {
12.
checkCurrentLevel(orgs[i]);
13.
orgs[i] = removeAFClinics(orgs[i]);
14.
}
15.
16.
e.success(orgs);
17.
});
18.
}
19.
},
20.
schema: {
21.
model: {
22.
id:
"EntityID"
,
23.
children:
"Children"
,
24.
hasChildren:
function
(item) {
25.
if
(item.Levelname ==
"clinic"
|| (item.Levelname ==
"base"
&& helper.isAirForce(groatSession, env, item))) {
26.
return
true
;
27.
}
28.
29.
return
item.Children && item.Children.length > 0;
30.
}
31.
}
32.
},
33.
filter: [
34.
{ field:
"hide"
, operator:
"eq"
, value: undefined },
35.
{ field:
"hide"
, operator:
"neq"
, value:
true
}
36.
],
37.
sort: { field:
'EntityDescInt'
, dir:
'desc'
}
38.
});
39.
40.
return
ds;
41.
}
e.success(orgs); on line 16 still hits, after the exception is thrown setting the datasource. The treeview never ends up loading any of the data in the UI.
Any help would be great, thanks.
Jason