Notifications

39 views

Symptoms


If customer is using "split()" method on a glidelist object in any of their widgets, the widget will throw below error:

2018-11-15 14:29:08 (724) Default-thread-7 C9D66EA5DB796300A73D561BDC961929 txid=fd972ae5db79 WARNING *** WARNING *** Evaluator: org.mozilla.javascript.EcmaError: Cannot find function split in object.

The error on the browser will be:

Server Javascript error Cannot find function split in object.

Release


All releases

 

Cause


The problem is that the split method is not available on list objects. 

If you look at mozilla's documentation, the split method is a method that exist on string objects. 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split 

Resolution


To fix the issue, use 'toString()' in order to allow the glidelist object to access the split() method.

For example, if you are using the method directly like:

data.test_array = data.fields.split(','); 

Change it to:

data.test_array = data.fields.toString().split(','); 

 

Article Information

Last Updated:2018-11-20 16:22:17
Published:2018-11-21