You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2023/10/05 14:56:19 UTC
[myfaces-tobago] 01/02: fix: NPE on ajax error
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch tobago-5.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 471453e3c4660a0d60c7e8cf080346e7ba271999
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Thu Oct 5 13:04:38 2023 +0200
fix: NPE on ajax error
* fix possible NPE
Issue: TOBAGO-2251
---
tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts
index 4e49836665..d12d6f1acc 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts
@@ -133,9 +133,9 @@ export class Page extends HTMLElement {
console.timeEnd("[tobago-jsf] jsf-ajax");
console.time("[tobago-jsf] jsf-ajax");
console.debug("[tobago-jsf] JSF event status: '%s'", event.status);
- if (event.status === "success") {
+ if (event.status === "success" && event.responseXML) {
event.responseXML.querySelectorAll("update").forEach(this.jsfResponseSuccess.bind(this));
- } else if (event.status === "complete") {
+ } else if (event.status === "complete" && event.responseXML) {
event.responseXML.querySelectorAll("update").forEach(this.jsfResponseComplete.bind(this));
}
}