Unhandled error being thrown in Safari/MacOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Start by reproducing the error in Safari on a page containing a DateTime component, then inspect the renderDays entry point and its getRow call in the react-datetime source. Done means the component no longer throws an unhandled error during navigation and the reported behavior is covered by a relevant check.
Written by the indexing model from the issue text.
Description
I'm Submitting a ...
[x] Bug report
[ ] Feature request
[ ] Support request
Steps to Reproduce
The issue is only appearing for certain users, specifically in Safari. Simply navigating to a page with a DateTime component causes an unhandled error to be thrown.
Expected Results
This appears to be an issue that should be caught internally - nothing appears to be abnormal in our code base looking through the stack trace.
Actual Results
An unhandled error is thrown:
TypeError: undefined is not an object (evaluating 'this.getRow(n,a++).push')
it appears the variables n as well as a are both undefined. The code is minified, so I don't know have much further than that. Is there perhaps some missing type checking/validation?
Other Information (e.g. stacktraces, related issues, suggestions how to fix)
The react-datetime code causing the issue is the following:
{
key: "renderDays",
value: function value(e, t, n) {
var r = [[], [], [], [], [], []],
o = e.clone().subtract(1, "months");
o.date(o.daysInMonth()).startOf("week");
for (var a = o.clone().add(42, "d"), i = 0; o.isBefore(a);) {
// THE FOLLOWING LINE THROWS:
this.getRow(r, i++).push(this.renderDay(o, t, n)), o.add(1, "d");
}
return r.map(function (e, t) {
return c.a.createElement("tr", {
key: "".concat(a.month(), "_").concat(t)
}, e);
});
}
},
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from arqex/react-datetime
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
arqex/react-datetime#880 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arqex/react-datetime#876 · 2 comments · 3 reactions ·
-
Disable past time Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arqex/react-datetime#874 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
arqex/react-datetime#873 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
arqex/react-datetime#871 · 3 comments ·
All issues in arqex/react-datetime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·