|
@@ -2934,7 +2934,16 @@ class TableAjax extends ViewAjax {
|
|
|
}).join(','),
|
|
}).join(','),
|
|
|
})
|
|
})
|
|
|
}).then(function (response) {
|
|
}).then(function (response) {
|
|
|
- return response.json()
|
|
|
|
|
|
|
+ return response.text()
|
|
|
|
|
+ }).then(function (responseText) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ // json = response.json() // BUG: error trafia do catch promisów, zamiast aktualnego bloku
|
|
|
|
|
+ // -- obiekt response pewnie jest powiązany z Promisem z fetch
|
|
|
|
|
+ // -- response.json() zwraca Promise tak samo jak response.text()
|
|
|
|
|
+ return JSON.parse(responseText)
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ throw responseText
|
|
|
|
|
+ }
|
|
|
}).then(function (result) {
|
|
}).then(function (result) {
|
|
|
if ('success' == result.type) {
|
|
if ('success' == result.type) {
|
|
|
p5UI__notifyAjaxCallback(result)
|
|
p5UI__notifyAjaxCallback(result)
|