Troubleshooting
Problem
Symptom
Cause
Development have observed a bug in client-side code that runs a function against the alert.type.classification property before ensuring that it is a string.
In the client's data set, alert.type.classifcation property is formed by a number. The client-side code incorrectly infers the implicit data type to be a number, rather than the expected string type.
The method - indexOf is an array function that checks whether an element exist within an array. This can be used on a string in JS as it can be treated as an array of characters.
Environment
Diagnosing The Problem
The code checks whether a substring exists within a string and at which position it starts at.
As the property's value in the affected client's environment is a number, a type conversion is carried out through layers of code, making alert.type.classification a number. IndexOf function can't be called on a number data type, causing breaking error we see in the UI.
Resolving The Problem
Workaround :
Until fix is delivered in 4.6 or a hotfix is provided as needed. We can side-step this issue by ensuring that the type conversion to a number for alert.type.classification does not occur. We can do this by suffixing or prefixing the the value of alert.type.classification with a character that would make the string alphanumeric such as 'A' or '-'.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
03 May 2024
UID
ibm17149879