We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99dbc66 commit 0c479b4Copy full SHA for 0c479b4
1 file changed
select2.js
@@ -2206,7 +2206,9 @@ the specific language governing permissions and limitations under the Apache Lic
2206
this.selection.data("select2-data", data);
2207
2208
container.empty();
2209
- formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
+ if (data !== null) {
2210
+ formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
2211
+ }
2212
if (formatted !== undefined) {
2213
container.append(formatted);
2214
}
0 commit comments