From 883b156dd1d42d3ba44413ea0cbaa76a7beb0276 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sat, 23 Jun 2018 15:03:07 +0200 Subject: Toolkit - Fix throws an error from Create a New Profile Issue #531 --- toolkit/profile/content/createProfileWizard.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'toolkit/profile/content') diff --git a/toolkit/profile/content/createProfileWizard.js b/toolkit/profile/content/createProfileWizard.js index 1963f66bc..14d006b31 100644 --- a/toolkit/profile/content/createProfileWizard.js +++ b/toolkit/profile/content/createProfileWizard.js @@ -96,13 +96,15 @@ function chooseProfileFolder() dirChooser.show(); newProfileRoot = dirChooser.file; - // Disable the "Default Folder..." button when the default profile folder - // was selected manually in the File Picker. - document.getElementById("useDefault").disabled = - (newProfileRoot.parent.equals(gDefaultProfileParent)); + if (newProfileRoot) { + // Disable the "Default Folder..." button when the default profile folder + // was selected manually in the File Picker. + document.getElementById("useDefault").disabled = + (newProfileRoot.parent.equals(gDefaultProfileParent)); - gProfileRoot = newProfileRoot; - updateProfileDisplay(); + gProfileRoot = newProfileRoot; + updateProfileDisplay(); + } } // Checks the current user input for validity and triggers an error message accordingly. -- cgit v1.2.3