Skip to content

Commit 27e537e

Browse files
authored
el null check in printValue (#300)
1 parent bf6a598 commit 27e537e

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

dist/countUp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var CountUp = /** @class */ (function () {
1515
var _this = this;
1616
this.endVal = endVal;
1717
this.options = options;
18-
this.version = '2.4.0';
18+
this.version = '2.4.1';
1919
this.defaults = {
2020
startVal: 0,
2121
decimalPlaces: 0,
@@ -255,6 +255,8 @@ var CountUp = /** @class */ (function () {
255255
};
256256
CountUp.prototype.printValue = function (val) {
257257
var result = this.formattingFn(val);
258+
if (!this.el)
259+
return;
258260
if (this.el.tagName === 'INPUT') {
259261
var input = this.el;
260262
input.value = result;

dist/countUp.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/countUp.umd.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
var _this = this;
2222
this.endVal = endVal;
2323
this.options = options;
24-
this.version = '2.4.0';
24+
this.version = '2.4.1';
2525
this.defaults = {
2626
startVal: 0,
2727
decimalPlaces: 0,
@@ -261,6 +261,8 @@
261261
};
262262
CountUp.prototype.printValue = function (val) {
263263
var result = this.formattingFn(val);
264+
if (!this.el)
265+
return;
264266
if (this.el.tagName === 'INPUT') {
265267
var input = this.el;
266268
input.value = result;

0 commit comments

Comments
 (0)