Skip to content

Commit

Permalink
Switching to Object.prototype.toString.call for IE11 support (elastic#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobelb authored and kimjoar committed Feb 8, 2018
1 parent 43a9234 commit d2adb9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/kbn-datemath/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const units = ['y', 'M', 'w', 'd', 'h', 'm', 's', 'ms'];
const unitsDesc = units;
const unitsAsc = [...unitsDesc].reverse();

const isDate = d => toString.call(d) === '[object Date]';
const isDate = d => Object.prototype.toString.call(d) === '[object Date]';

const isValidDate = d => isDate(d) && !isNaN(d.valueOf());

Expand Down

0 comments on commit d2adb9f

Please sign in to comment.