Hello!
Have some code:
$.ajax({
url: '/data.php',
method: "POST",
data: {
t: 'macroregion'
},
error: function () { console.log(error); },
complete: function (data) {
gantt.load(JSON.parse(data.responseText));
}
});
data.php response:
But get error:
bluebird.js:1564 Unhandled rejection TypeError: i.indexOf is not a function
at http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:397310
at D.i._execute (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:319433)
at D._resolveFromExecutor (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:349820)
at new D (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:342993)
at Object._call (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:396717)
at Object.query (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:396036)
at Object.get (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:396167)
at Object.t.load (http://localhost/codebase/dhtmlxgantt.js?v=6.0.3:10:144057)
at Object.complete (<anonymous>:11:9)
at u (http://localhost/js/jquery-3.3.1.min.js:2:27457)
at Object.fireWith (http://localhost/js/jquery-3.3.1.min.js:2:28202)
at k (http://localhost/js/jquery-3.3.1.min.js:2:77779)
at XMLHttpRequest.<anonymous> (http://localhost/js/jquery-3.3.1.min.js:2:79907)
What’s wrong in my code?