File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ import CloudStorageProvider from './ProjectsStorage/CloudStorageProvider';
28
28
import BrowserResourceMover from './ProjectsStorage/ResourceMover/BrowserResourceMover' ;
29
29
import BrowserResourceFetcher from './ProjectsStorage/ResourceFetcher/BrowserResourceFetcher' ;
30
30
31
+ // Make sure that the process object is available, even if we are not in Node.
32
+ // This is needed by some libraries like path-browserify for example.
33
+ // and it avoids hard crashes when using them.
34
+ global . process = global . process || {
35
+ cwd : ( ) => '/' ,
36
+ } ;
37
+
31
38
export const create = ( authentication : Authentication ) => {
32
39
Window . setUpContextMenu ( ) ;
33
40
@@ -81,7 +88,9 @@ export const create = (authentication: Authentication) => {
81
88
resourceMover = { BrowserResourceMover }
82
89
resourceFetcher = { BrowserResourceFetcher }
83
90
getStorageProviderOperations = { getStorageProviderOperations }
84
- getStorageProviderResourceOperations = { getStorageProviderResourceOperations }
91
+ getStorageProviderResourceOperations = {
92
+ getStorageProviderResourceOperations
93
+ }
85
94
getStorageProvider = { getStorageProvider }
86
95
resourceSources = { browserResourceSources }
87
96
resourceExternalEditors = { browserResourceExternalEditors }
You can’t perform that action at this time.
0 commit comments