Problem with addWorkingTime(hour, 'hours'), crash browser IE 11/Edge
peterhe2000 opened this issue · 3 comments
peterhe2000 commented
Seems issue happening with this function in the libraray
function addOrSubtractMethod(fn) {
return function (num, unit) {
if (typeof unit !== 'string') {
throw new Error('unit must be defined');
}
if (typeof num !== 'number') {
throw new Error('duration must be defined');
}
var args = [].slice.call(arguments);
if (args.length % 2) {
throw new Error('moment#(add/subtract)WorkingTime requires an even number of arguments');
}
var d = this;
while (args.length >= 2) {
d = fn.bind(null, d).apply(null, args.slice(-2));
args = args.slice(0, -2);
}
return copy(d, this);
};
}
Debug via edge seems freeze at line d = fn.bind(null, d).apply(null, args.slice(-2));
. any ideas?
peterhe2000 commented
It has been a month. May i know any update for this issue?
lennym commented
I haven't looked at it at all to be quite honest.
If you can provide the following information then that would be useful:
- What version of this module are you using?
- How are you compiling it for use in the browser? (e.g. browserify, webpack etc)
- Can you reproduce the error in any other browsers?
- Do you have a small, reproducible test case for the issue?
- Have you taken any steps to debug the issue yourself?
Thanks.
peterhe2000 commented
Sry. It's not your library's issue.
It's an issue from Angular 2 datePipe service angular/angular#9524.
Thanks for getting back to me.