From 8e71c8d4a963054987fcf6a03e7a72c8552ffeb8 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 22 Apr 2020 16:04:19 +0530 Subject: [PATCH] fix: variable assignment --- frappe/public/js/frappe/widgets/onboarding_widget.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frappe/public/js/frappe/widgets/onboarding_widget.js b/frappe/public/js/frappe/widgets/onboarding_widget.js index 7921e9d675..8318e8049d 100644 --- a/frappe/public/js/frappe/widgets/onboarding_widget.js +++ b/frappe/public/js/frappe/widgets/onboarding_widget.js @@ -21,27 +21,28 @@ export default class OnboardingWidget extends Widget { `); if (!step.is_complete) { + let action = () => {}; if (step.action == "Watch Video") { - let action = () => { + action = () => { frappe.help.show_video(step.video_url, step.title); this.mark_complete(step.name, $step); } } else if (step.action == "Create Entry") { - let action = () => { + action = () => { frappe.ui.form.make_quick_entry(step.reference_document, null, null, null, true) } } else if (step.action == "View Settings") { - let action = () => { + action = () => { frappe.set_route("Form", step.reference_document) } } else if (step.action == "View Report") { - let action = () => { + action = () => { let route = generate_route({ name: step.reference_report, type: 'report',