File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ 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
+ env : { } ,
36
+ cwd : ( ) => '/' ,
37
+ } ;
38
+
31
39
export const create = ( authentication : Authentication ) => {
32
40
Window . setUpContextMenu ( ) ;
33
41
@@ -81,7 +89,9 @@ export const create = (authentication: Authentication) => {
81
89
resourceMover = { BrowserResourceMover }
82
90
resourceFetcher = { BrowserResourceFetcher }
83
91
getStorageProviderOperations = { getStorageProviderOperations }
84
- getStorageProviderResourceOperations = { getStorageProviderResourceOperations }
92
+ getStorageProviderResourceOperations = {
93
+ getStorageProviderResourceOperations
94
+ }
85
95
getStorageProvider = { getStorageProvider }
86
96
resourceSources = { browserResourceSources }
87
97
resourceExternalEditors = { browserResourceExternalEditors }
You can’t perform that action at this time.
0 commit comments