Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timesheet timer breaks when adding record to empty timesheet time sheets table #35011

Closed
tundebabzy opened this issue Apr 24, 2023 · 0 comments · Fixed by #35013
Closed

Timesheet timer breaks when adding record to empty timesheet time sheets table #35011

tundebabzy opened this issue Apr 24, 2023 · 0 comments · Fixed by #35013
Labels

Comments

@tundebabzy
Copy link
Contributor

tundebabzy commented Apr 24, 2023

Information about bug

f you delete all the rows in the time sheets table in a saved timesheet, the automatic timer breaks.

Peek.2023-04-24.09-07.mp4

The problem comes from here:
Screenshot from 2023-04-24 09-34-20
(timer.js line:71)

frm.doc.time_logs.length <= 1 will be true when frm.doc.time_logs.length is 0 but frm.doc.time_logs[0] is undefined when frm.doc.time_logs.length

Module

projects

Version

erpnext 14.x.x-develop
frappe 15.0.0-dev

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

`Uncaught TypeError: frm.doc.time_logs[0] is undefined`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant