Skip to content

Commit

Permalink
el null check in printValue (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
inorganik authored Jan 24, 2023
1 parent bf6a598 commit 27e537e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion dist/countUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var CountUp = /** @class */ (function () {
var _this = this;
this.endVal = endVal;
this.options = options;
this.version = '2.4.0';
this.version = '2.4.1';
this.defaults = {
startVal: 0,
decimalPlaces: 0,
Expand Down Expand Up @@ -255,6 +255,8 @@ var CountUp = /** @class */ (function () {
};
CountUp.prototype.printValue = function (val) {
var result = this.formattingFn(val);
if (!this.el)
return;
if (this.el.tagName === 'INPUT') {
var input = this.el;
input.value = result;
Expand Down
2 changes: 1 addition & 1 deletion dist/countUp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/countUp.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var _this = this;
this.endVal = endVal;
this.options = options;
this.version = '2.4.0';
this.version = '2.4.1';
this.defaults = {
startVal: 0,
decimalPlaces: 0,
Expand Down Expand Up @@ -261,6 +261,8 @@
};
CountUp.prototype.printValue = function (val) {
var result = this.formattingFn(val);
if (!this.el)
return;
if (this.el.tagName === 'INPUT') {
var input = this.el;
input.value = result;
Expand Down
Loading

0 comments on commit 27e537e

Please sign in to comment.