mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Resolve Uncaught TypeError (#16392)
A `TypeError` raised when a certain file, or lack thereof, causes Atom to open improperly, without the side pane appearing. To fix this, users must clear their Atom window state, then reopen the program. Add a notification when this error occurs with information on how to resolve it. Co-authored-by: Sadick <sadickjunior@gmail.com> Co-authored-by: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
This commit is contained in:
@@ -350,7 +350,13 @@ module.exports = class Project extends Model {
|
||||
// Public: Get an {Array} of {String}s containing the paths of the project's
|
||||
// directories.
|
||||
getPaths() {
|
||||
return this.rootDirectories.map(rootDirectory => rootDirectory.getPath());
|
||||
try {
|
||||
return this.rootDirectories.map(rootDirectory => rootDirectory.getPath());
|
||||
} catch (e) {
|
||||
atom.notifications.addError(
|
||||
"Please clear Atom's window state with: atom --clear-window-state"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Public: Set the paths of the project's directories.
|
||||
|
||||
Reference in New Issue
Block a user