We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db3ad68 commit c8b0810Copy full SHA for c8b0810
1 file changed
docs/translate/translate.gs
@@ -97,13 +97,11 @@ function getSelectedText() {
97
}
98
99
100
- if (!text.length) {
101
- throw new Error('Please select some text.');
102
- }
103
- return text;
104
- } else {
105
+
+ if (text.length) return text;
106
+ throw new Error('Please select some text.');
107
108
109
/**
0 commit comments