Skip to content

Commit

Permalink
fix #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Xiu authored and Drew Xiu committed Jan 2, 2025
1 parent 0c86b8d commit a86b32d
Show file tree
Hide file tree
Showing 9 changed files with 9,653 additions and 7,723 deletions.
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion dist/components/Ellipsus.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,14 @@ var Ellipsus = exports.Ellipsus = function (_PureComponent) {
textOverflow = _state2.textOverflow;


if (children === null || children === undefined) {
return null;
}
if (typeof children === 'number') {
children = String(children);
}
if (typeof children !== 'string') {
throw Error('Ellipsus: only string is allowed as children, got: ' + (typeof children === 'undefined' ? 'undefined' : (0, _typeof3.default)(children)));
throw Error('Ellipsus: only string/number is allowed as children, got: ' + (typeof children === 'undefined' ? 'undefined' : (0, _typeof3.default)(children)));
}

duration = (duration / 1000).toFixed(2) || 2;
Expand Down
9 changes: 7 additions & 2 deletions dist/components/Flyby.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,14 @@ var Flyby = exports.Flyby = function (_PureComponent) {
marginLeft = _state.marginLeft,
duration = _state.duration;


if (children === null || children === undefined) {
return null;
}
if (typeof children === 'number') {
children = String(children);
}
if (typeof children !== 'string') {
throw Error('Ellipsus: only string is allowed as children, got: ' + (typeof children === 'undefined' ? 'undefined' : (0, _typeof3.default)(children)));
throw Error('Ellipsus: only string/number is allowed as children, got: ' + (typeof children === 'undefined' ? 'undefined' : (0, _typeof3.default)(children)));
}

duration = (duration / 1000).toFixed(2) || 2;
Expand Down
Loading

0 comments on commit a86b32d

Please sign in to comment.