File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
SpringBoot-MVC/src/main/resources/static Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11/**
2- * Copyright 2022, 2023 IBM Corp.
2+ * Copyright 2022, 2024 IBM Corp.
33 *
44 * Licensed under the Apache License, Version 2.0 (the 'License');
55 * you may not use this file except in compliance with the License.
@@ -94,8 +94,6 @@ async function sendMessage() {
9494
9595 if ( res . status === true ) {
9696 addMessage ( res . data ) ;
97- } else {
98- addMessage ( res . data ) ;
9997 }
10098
10199 spinner . style . display = "none" ;
@@ -104,8 +102,10 @@ async function sendMessage() {
104102async function getMessage ( ) {
105103 const spinner = document . querySelector ( ".spinner" ) ;
106104 spinner . style . display = "block" ;
107- let msg = await performGet ( ) ;
108- addMessage ( msg . data ) ;
105+ let res = await performGet ( ) ;
106+ if ( res . status == true ) {
107+ addMessage ( res . data ) ;
108+ }
109109 spinner . style . display = "none" ;
110110}
111111
You can’t perform that action at this time.
0 commit comments