luci-app-wol: cope with empty stdout
authorJo-Philipp Wich <jo@mein.io>
Sun, 26 Jan 2020 21:51:22 +0000 (22:51 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 26 Jan 2020 21:51:22 +0000 (22:51 +0100)
Fix a cosmetic issue when etherwake is sending to an invalid interface.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js

index 0eb7b4f7ca4ab33f7d2320908afdf346eecc9000..aeecd54fcfb0833a0f606dd585a9ae1ef72097cf 100644 (file)
@@ -104,7 +104,7 @@ return L.view.extend({
 
                        return fs.exec(bin, args).then(function(res) {
                                ui.showModal(_('Waking host'), [
-                                       E('p', [ res.stdout ]),
+                                       res.stderr ? E('p', [ res.stdout ]) : '',
                                        res.stderr ? E('pre', [ res.stderr ]) : '',
                                        E('div', { 'class': 'right' }, [
                                                E('button', {