Skip to content

Commit 2f4cc19

Browse files
committed
If a named style can't be determined, return null
Previously this would return `style` if it couldn't be resolved and the `style` attribute on the element is set for some reason. Now it will return `null`, because it tried to resolve the width but was not able to. This will allow it to fall back to `element` by default, or not set the width at all. This closes select2#2935.
1 parent f427451 commit 2f4cc19

7 files changed

Lines changed: 12 additions & 2 deletions

File tree

dist/js/select2.amd.full.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,6 +4045,8 @@ define('select2/core',[
40454045
return matches[1];
40464046
}
40474047
}
4048+
4049+
return null;
40484050
}
40494051

40504052
return method;

dist/js/select2.amd.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,6 +4045,8 @@ define('select2/core',[
40454045
return matches[1];
40464046
}
40474047
}
4048+
4049+
return null;
40484050
}
40494051

40504052
return method;

dist/js/select2.full.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13580,6 +13580,8 @@ define('select2/core',[
1358013580
return matches[1];
1358113581
}
1358213582
}
13583+
13584+
return null;
1358313585
}
1358413586

1358513587
return method;

dist/js/select2.full.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/select2.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4473,6 +4473,8 @@ define('select2/core',[
44734473
return matches[1];
44744474
}
44754475
}
4476+
4477+
return null;
44764478
}
44774479

44784480
return method;

dist/js/select2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/select2/core.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ define([
151151
return matches[1];
152152
}
153153
}
154+
155+
return null;
154156
}
155157

156158
return method;

0 commit comments

Comments
 (0)