Commit c23a0eb4 authored by Romain Casati's avatar Romain Casati
Browse files

Case of empty SQL result.

parent 07114d2f
......@@ -41,9 +41,13 @@
let result = this.db.exec(code);
// return result
if( typeof result !== 'undefined' )
result = {'text/plain': JSON.stringify(result),
'text/html': result};
if( typeof result !== 'undefined' ) {
if( result.length == 0 )
result = undefined
else
result = {'text/plain': JSON.stringify(result),
'text/html': result};
}
return [result, ++this.execution_count];
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment