Fixed FELIX-3404 Web Admin Log Plugin stops listing of log entries if message is null.
https://issues.apache.org/jira/browse/FELIX-3404
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1306183 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/res/lib/support.js b/webconsole/src/main/resources/res/lib/support.js
index a5c118c..460a3b5 100644
--- a/webconsole/src/main/resources/res/lib/support.js
+++ b/webconsole/src/main/resources/res/lib/support.js
@@ -152,10 +152,14 @@
/* String */ function wordWrap( /* String */ msg ) {
- var userAgent = navigator.userAgent.toLowerCase();
- var isMozilla = /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent );
-
- return isMozilla ? msg.split('').join(String.fromCharCode('8203')) : msg;
+ if (msg) {
+ var userAgent = navigator.userAgent.toLowerCase();
+ var isMozilla = /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent );
+
+ return isMozilla ? msg.split('').join(String.fromCharCode('8203')) : msg;
+ } else {
+ return '';
+ }
}