File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -662,11 +662,16 @@ api.modal.success = function (pMessage) {
662
662
$ ( "#modal-success" ) . modal ( "show" ) ;
663
663
} ;
664
664
665
+ /**
666
+ * Pop an Error Modal in Bootstrap
667
+ * @param {* } pMessage
668
+ */
665
669
/**
666
670
* Pop an Error Modal in Bootstrap
667
671
* @param {* } pMessage
668
672
*/
669
673
api . modal . error = function ( pMessage ) {
674
+
670
675
var msgObj ;
671
676
if ( typeof pMessage == "string" ) {
672
677
try {
@@ -687,7 +692,11 @@ api.modal.error = function (pMessage) {
687
692
$ ( "#modal-error" ) . find ( '[name=more-info-content]' ) . addClass ( 'd-none' ) ;
688
693
689
694
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
+ }
691
700
} else {
692
701
$ ( "#modal-error" ) . find ( '[name=message-text]' ) . empty ( ) . html ( msgObj . title ) ;
693
702
}
You can’t perform that action at this time.
0 commit comments