1
0
mirror of synced 2024-11-30 00:26:03 +03:00

additional tweal to #1528 to make formatters skip nulls

This commit is contained in:
Igor Vaynberg 2013-07-17 00:32:41 -07:00
parent 99dbc66d95
commit 0c479b4cd1

View File

@ -2206,7 +2206,9 @@ the specific language governing permissions and limitations under the Apache Lic
this.selection.data("select2-data", data); this.selection.data("select2-data", data);
container.empty(); container.empty();
if (data !== null) {
formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup); formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
}
if (formatted !== undefined) { if (formatted !== undefined) {
container.append(formatted); container.append(formatted);
} }