Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4b0b231

Browse files
committedMay 29, 2020
add-dialog assign to @ after calling super
1 parent eb80b2b commit 4b0b231

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎lib/add-dialog.coffee

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ import {repoForPath} from './helpers'
66

77
export default class AddDialog extends Dialog
88
constructor: (initialPath, isCreatingFile) ->
9-
@isCreatingFile = isCreatingFile
109

1110
if fs.isFileSync(initialPath)
1211
directoryPath = path.dirname(initialPath)
1312
else
1413
directoryPath = initialPath
1514

1615
relativeDirectoryPath = directoryPath
17-
[@rootProjectPath, relativeDirectoryPath] = atom.project.relativizePath(directoryPath)
16+
[rootProjectPath, relativeDirectoryPath] = atom.project.relativizePath(directoryPath)
1817
relativeDirectoryPath += path.sep if relativeDirectoryPath.length > 0
1918

2019
super
@@ -23,6 +22,10 @@ export default class AddDialog extends Dialog
2322
select: false
2423
iconClass: if isCreatingFile then 'icon-file-add' else 'icon-file-directory-create'
2524

25+
@isCreatingFile = isCreatingFile
26+
@rootProjectPath = rootProjectPath
27+
28+
2629
onDidCreateFile: (callback) ->
2730
@emitter.on('did-create-file', callback)
2831

0 commit comments

Comments
 (0)
This repository has been archived.