File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -662,11 +662,16 @@ api.modal.success = function (pMessage) {
662662 $ ( "#modal-success" ) . modal ( "show" ) ;
663663} ;
664664
665+ /**
666+ * Pop an Error Modal in Bootstrap
667+ * @param {* } pMessage
668+ */
665669/**
666670 * Pop an Error Modal in Bootstrap
667671 * @param {* } pMessage
668672 */
669673api . modal . error = function ( pMessage ) {
674+
670675 var msgObj ;
671676 if ( typeof pMessage == "string" ) {
672677 try {
@@ -687,7 +692,11 @@ api.modal.error = function (pMessage) {
687692 $ ( "#modal-error" ) . find ( '[name=more-info-content]' ) . addClass ( 'd-none' ) ;
688693
689694 if ( typeof pMessage == "object" ) {
690- $ ( "#modal-error" ) . find ( '[name=message-text]' ) . empty ( ) . html ( msgObj ) ;
695+ if ( msgObj . hasOwnProperty ( 'title' ) ) {
696+ $ ( "#modal-error" ) . find ( '[name=message-text]' ) . empty ( ) . html ( msgObj . title ) ;
697+ } else {
698+ $ ( "#modal-error" ) . find ( '[name=message-text]' ) . empty ( ) . html ( msgObj ) ;
699+ }
691700 } else {
692701 $ ( "#modal-error" ) . find ( '[name=message-text]' ) . empty ( ) . html ( msgObj . title ) ;
693702 }
You can’t perform that action at this time.
0 commit comments