[polari] style: Omit braces if all blocks are single lines
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] style: Omit braces if all blocks are single lines
- Date: Thu, 4 Apr 2019 16:01:33 +0000 (UTC)
commit 5c13b55f7f7a7c4e7b4b855946ef52c422ca60a9
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Apr 3 23:10:07 2019 +0200
style: Omit braces if all blocks are single lines
This has always been the coding style (inherited from gjs/gnome-shell),
but some violations have sneaked in over time.
https://gitlab.gnome.org/GNOME/polari/merge_requests/108
src/pasteManager.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/pasteManager.js b/src/pasteManager.js
index 63d31aa..1aaa816 100644
--- a/src/pasteManager.js
+++ b/src/pasteManager.js
@@ -23,15 +23,14 @@ function _getTargetForContentType(contentType) {
var PasteManager = class {
pasteContent(content, title, callback) {
- if (typeof content == 'string') {
+ if (typeof content == 'string')
Utils.gpaste(content, title, callback);
- } else if (content instanceof GdkPixbuf.Pixbuf) {
+ else if (content instanceof GdkPixbuf.Pixbuf)
Utils.imgurPaste(content, title, callback);
- } else if (content.query_info_async) {
+ else if (content.query_info_async)
this._pasteFile(content, title, callback);
- } else {
+ else
throw new Error('Unhandled content type');
- }
}
_pasteFile(file, title, callback) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]