|
@@ -284,7 +284,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
var classes, replacements = [], adapted;
|
|
var classes, replacements = [], adapted;
|
|
|
|
|
|
classes = dest.attr("class");
|
|
classes = dest.attr("class");
|
|
- if (typeof classes === "string") {
|
|
|
|
|
|
+ if (classes) {
|
|
|
|
+ classes = '' + classes; // for IE which returns object
|
|
$(classes.split(" ")).each2(function() {
|
|
$(classes.split(" ")).each2(function() {
|
|
if (this.indexOf("select2-") === 0) {
|
|
if (this.indexOf("select2-") === 0) {
|
|
replacements.push(this);
|
|
replacements.push(this);
|
|
@@ -292,11 +293,12 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
});
|
|
});
|
|
}
|
|
}
|
|
classes = src.attr("class");
|
|
classes = src.attr("class");
|
|
- if (typeof classes === "string") {
|
|
|
|
|
|
+ if (classes) {
|
|
|
|
+ classes = '' + classes; // for IE which returns object
|
|
$(classes.split(" ")).each2(function() {
|
|
$(classes.split(" ")).each2(function() {
|
|
if (this.indexOf("select2-") !== 0) {
|
|
if (this.indexOf("select2-") !== 0) {
|
|
adapted = adapter(this);
|
|
adapted = adapter(this);
|
|
- if (typeof adapted === "string" && adapted.length > 0) {
|
|
|
|
|
|
+ if (adapted) {
|
|
replacements.push(this);
|
|
replacements.push(this);
|
|
}
|
|
}
|
|
}
|
|
}
|