Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -810,16 +810,15 @@ |
811 | 811 | if( className ) { |
812 | 812 | messageDiv.setAttribute( 'class', 'mw-js-message-'+className ); |
813 | 813 | } |
814 | | - messageDiv.innerHTML = message; |
815 | 814 | |
816 | | - if (typeof message == 'string') { |
817 | | - messageDiv.innerHTML = message; |
818 | | - } |
819 | | - else if (typeof message == 'object') { |
| 815 | + if (typeof message === 'object') { |
820 | 816 | while (messageDiv.hasChildNodes()) // Remove old content |
821 | 817 | messageDiv.removeChild(messageDiv.firstChild); |
822 | 818 | messageDiv.appendChild (message); // Append new content |
823 | 819 | } |
| 820 | + else { |
| 821 | + messageDiv.innerHTML = message; |
| 822 | + } |
824 | 823 | return true; |
825 | 824 | } |
826 | 825 | |