File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,13 @@ class CoCreateFileSystem {
4242 }
4343 }
4444
45+ let organization_id
4546 if ( ! organization || organization . error ) {
4647 let hostNotFound = await getDefaultFile ( '/hostNotFound.html' )
4748 return sendResponse ( hostNotFound . object [ 0 ] . src , 404 , { 'Content-Type' : 'text/html' } )
4849 }
4950
50- const organization_id = organization . _id
51+ organization_id = organization . _id
5152 data . organization_id = organization_id
5253
5354 res . setHeader ( 'organization' , organization_id )
@@ -176,11 +177,12 @@ class CoCreateFileSystem {
176177 src = JSON . stringify ( src ) ;
177178 }
178179
179- crud . wsManager . emit ( "setBandwidth" , {
180- type : 'out' ,
181- data : src ,
182- organization_id
183- } ) ;
180+ if ( organization_id )
181+ crud . wsManager . emit ( "setBandwidth" , {
182+ type : 'out' ,
183+ data : src ,
184+ organization_id
185+ } ) ;
184186 res . writeHead ( statusCode , headers ) ;
185187 return res . end ( src ) ;
186188 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments