Answer the question
In order to leave comments, you need to log in
What could be wrong with Select2?
jQuery.Deferred exception: undefined is not an object (evaluating 'data.slice')
Answer the question
In order to leave comments, you need to log in
The slice() array method is applied to the data variable, but at this moment data is not an array (it is also an object in the understanding of JS).
Such errors occur when, before processing the array, they forget to register exceptional conditions, when the data object can be formed not as an empty array, but, for example, may contain error information passed from the abstraction layer, which normally generates data as an array .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question