From 2ecf45b258c0a914cf77f227aac6ea5eff198f39 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Mon, 1 May 2017 10:29:28 +0530 Subject: [PATCH] [minor] fixes for https://github.com/frappe/erpnext/issues/8638 --- frappe/core/doctype/file/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/file/file.js b/frappe/core/doctype/file/file.js index 62298fe809..6d77cb91ad 100644 --- a/frappe/core/doctype/file/file.js +++ b/frappe/core/doctype/file/file.js @@ -23,7 +23,7 @@ frappe.ui.form.on("File", "refresh", function(frm) { wrapper.empty(); } - if(frm.doc.file_name.split('.').splice(-1)[0]==='zip') { + if(frm.doc.file_name && frm.doc.file_name.split('.').splice(-1)[0]==='zip') { frm.add_custom_button(__('Unzip'), function() { frappe.call({ method: "frappe.core.doctype.file.file.unzip_file",