From c43647ca8615c5a907eb53269ad36e1f22ccc21a Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 25 Jan 2018 11:14:16 +0000 Subject: [PATCH] Handle null profile flow file name --- editor/js/ui/projects/projects.js | 1 + red/runtime/storage/localfilesystem/projects/Project.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/js/ui/projects/projects.js b/editor/js/ui/projects/projects.js index 5682a2053..f244e1b3d 100644 --- a/editor/js/ui/projects/projects.js +++ b/editor/js/ui/projects/projects.js @@ -1811,6 +1811,7 @@ RED.projects = (function() { function showNewProjectScreen() { + createProjectOptions = {}; if (!activeProject) { show('welcome'); } else { diff --git a/red/runtime/storage/localfilesystem/projects/Project.js b/red/runtime/storage/localfilesystem/projects/Project.js index b8591f78d..d5cc2cd04 100644 --- a/red/runtime/storage/localfilesystem/projects/Project.js +++ b/red/runtime/storage/localfilesystem/projects/Project.js @@ -685,7 +685,11 @@ Project.prototype.getFlowFile = function() { } Project.prototype.getFlowFileBackup = function() { - return getBackupFilename(this.getFlowFile()); + var flowFile = this.getFlowFile(); + if (flowFile) { + return getBackupFilename(flowFile); + } + return null; } Project.prototype.getCredentialsFile = function() { // console.log("Project.getCredentialsFile = ",this.paths.credentialsFile);