node: fix Bufer deprecation (node 10.1) (#348)
This commit is contained in:
parent
063d859e58
commit
332a428fc7
1 changed files with 3 additions and 1 deletions
|
|
@ -19,7 +19,9 @@ express.get('*', function(req, res){
|
|||
if (req.path.indexOf('theme.css') != -1) {
|
||||
res.set('Content-Type', 'text/css')
|
||||
if (settings.read('theme')) {
|
||||
res.send(new Buffer(theme.get()))
|
||||
var str = theme.get(),
|
||||
buf = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from(str) : new Buffer(str)
|
||||
res.send(buf)
|
||||
} else {
|
||||
res.send('')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue