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

fix: prevent TypeError if doc not defined #25538

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

akhilnarang
Copy link
Member

@akhilnarang akhilnarang commented Mar 19, 2024

Happens here on a local setup if I click Compose Email button

communication.js:212 Uncaught TypeError: Cannot read properties of undefined (reading 'doc')
    at frappe.views.CommunicationComposer.guess_language (communication.js:212:32)
    at frappe.views.CommunicationComposer.setup_print (communication.js:536:8)
    at frappe.views.CommunicationComposer.prepare (communication.js:239:8)
    at frappe.views.CommunicationComposer.make (communication.js:41:8)
    at new frappe.views.CommunicationComposer (communication.js:16:8)
    at Object.primary_action (communication__list_js:34:3)
    at HTMLButtonElement.<anonymous> (list_view.js:1426:19)
    at HTMLButtonElement.dispatch (jquery.js:5135:27)
    at elemData.handle (jquery.js:4939:28)

Happens here on a local setup if I click `Compose Email` button

communication.js:212 Uncaught TypeError: Cannot read properties of undefined (reading 'doc')
    at frappe.views.CommunicationComposer.guess_language (communication.js:212:32)
    at frappe.views.CommunicationComposer.setup_print (communication.js:536:8)
    at frappe.views.CommunicationComposer.prepare (communication.js:239:8)
    at frappe.views.CommunicationComposer.make (communication.js:41:8)
    at new frappe.views.CommunicationComposer (communication.js:16:8)
    at Object.primary_action (communication__list_js:34:3)
    at HTMLButtonElement.<anonymous> (list_view.js:1426:19)
    at HTMLButtonElement.dispatch (jquery.js:5135:27)
    at elemData.handle (jquery.js:4939:28)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
@akhilnarang akhilnarang requested review from a team and ankush and removed request for a team March 19, 2024 11:52
@akhilnarang akhilnarang added the backport version-15-hotfix Backport the PR to v15 label Mar 19, 2024
@akhilnarang akhilnarang merged commit 288a7c3 into frappe:develop Mar 19, 2024
20 of 24 checks passed
@akhilnarang akhilnarang deleted the fix-undefined-document branch March 19, 2024 12:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant