File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,18 @@ module.exports = (app) => {
4242 }
4343 } ) ;
4444
45- app . get ( '/code' , ( req , res ) => { res . render ( "editor" ) ; } ) ;
45+ /* app.get('/code',(req,res) => { res.render("editor"); });
4646
4747 app.get('/code/:id', (req, res)=>{
4848 res.render("editor", {
4949 id: req.params.id
5050 });
51- } ) ;
51+ });*/
5252
53- app . get ( '/nicecode ' , ( req , res ) => {
53+ app . get ( '/code ' , ( req , res ) => {
5454 res . render ( "editor" , { id : - 1 } ) ;
5555 } ) ;
56- app . get ( '/nicecode /:id' , ( req , res ) => {
56+ app . get ( '/code /:id' , ( req , res ) => {
5757 res . render ( "editor" , { id : req . params . id } ) ;
5858 } ) ;
5959
Original file line number Diff line number Diff line change @@ -239,9 +239,9 @@ io.on('connection', (socket) => {
239239 console . log ( "A trimis" ) ;
240240 socket . emit ( 'editor_source' , dbData ) ;
241241 }
242- else socket . emit ( 'editor_source' , { code : 'There is no source code saved with this id' } ) ;
242+ else socket . emit ( 'editor_source' , { code : '// There is no source code saved with this id' } ) ;
243243 }
244- else socket . emit ( 'editor_source' , { code : 'There is no source code saved with this id' } ) ;
244+ else socket . emit ( 'editor_source' , { code : '// There is no source code saved with this id' } ) ;
245245 } ) ;
246246 } ) ;
247247
Original file line number Diff line number Diff line change @@ -31,13 +31,15 @@ function getEditorInstanceFromServer() {
3131function populateEditorInstance ( data ) {
3232 console . log ( JSON . stringify ( data ) ) ;
3333 editor . setValue ( data . code , 1 ) ;
34+ if ( data . breakpoints )
3435 for ( var i = 0 ; i < data . breakpoints . length ; i ++ ) {
3536 var line = data . breakpoints [ i ] . line ;
3637 toggleBreakpoint ( line - 1 ) ;
3738 Global . breakpointsMap [ line ] = new BreakpointData ( line , data . breakpoints [ i ] . temporary ,
3839 data . breakpoints [ i ] . condition ) ;
3940 }
4041 var newData = [ ] ;
42+ if ( data . watches )
4143 for ( var i = 0 ; i < data . watches . length ; i ++ ) {
4244 var wtext = data . watches [ i ] . expr ;
4345 addWithBackup ( { text : wtext } ) ;
You can’t perform that action at this time.
0 commit comments