Commit 6dc2a95d authored by Son Nguyen's avatar Son Nguyen
Browse files

Bug 1609538: Don't display the alert message if empty

behatnotneeded

Change-Id: I8bc1287f6fbd45ac47a3e2351c063e1a05c16af1
parent 298823d9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -209,6 +209,9 @@ function makeMessage(message, type) {
 * Appends a status message to the end of elemid
 */
function displayMessage(message, type, hideprevmsg) {
    if (message === undefined || message == '') {
        return;
    }
    // ensure we have type 'ok', 'error', or 'info' (the default)
    if (!type || (type != 'ok' && type != 'error')) {
        type = 'info';
@@ -331,7 +334,7 @@ function sendjsonrequest(url, data, method, successcallback, errorcallback, quie
            data = data.message;
        }

        if (typeof(data.message) === 'string' && !quiet) {
        if (typeof(data.message) === 'string' && (data.message != '') && !quiet) {
            displayMessage(data.message, error ? 'error' : 'ok');
        }