aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-31 21:17:48 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-05-31 21:30:37 +0530
commitee9c6ff0197ee4c7cd1cfe5cc5e4932402e22606 (patch)
treebf225ed68ed48bf5b723d09cf1aadfc9d9508891
parent6.3.0-nightly.15 [skip ci] (diff)
downloadferdium-app-ee9c6ff0197ee4c7cd1cfe5cc5e4932402e22606.tar.gz
ferdium-app-ee9c6ff0197ee4c7cd1cfe5cc5e4932402e22606.tar.zst
ferdium-app-ee9c6ff0197ee4c7cd1cfe5cc5e4932402e22606.zip
Fix to remove the 'undefined' suffix on tooltips beyond the 10th service/workspace
-rw-r--r--src/jsUtils.ts2
-rw-r--r--test/jsUtils.test.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/jsUtils.ts b/src/jsUtils.ts
index ac7258644..f6a1df2fe 100644
--- a/src/jsUtils.ts
+++ b/src/jsUtils.ts
@@ -29,4 +29,4 @@ export const acceleratorString = (
29 keyCombo: string, 29 keyCombo: string,
30 prefix: string = '(', 30 prefix: string = '(',
31 suffix: string = ')', 31 suffix: string = ')',
32) => (index <= 10 ? `${prefix}${keyCombo}+${index % 10}${suffix}` : undefined); 32) => (index <= 10 ? `${prefix}${keyCombo}+${index % 10}${suffix}` : '');
diff --git a/test/jsUtils.test.ts b/test/jsUtils.test.ts
index 411ef28f9..ff7d29d77 100644
--- a/test/jsUtils.test.ts
+++ b/test/jsUtils.test.ts
@@ -146,7 +146,7 @@ describe('jsUtils', () => {
146 }); 146 });
147 147
148 it('handles index = 11', () => { 148 it('handles index = 11', () => {
149 expect(jsUtils.acceleratorString(11, 'abc')).toEqual(undefined); 149 expect(jsUtils.acceleratorString(11, 'abc')).toEqual('');
150 }); 150 });
151 }); 151 });
152}); 152});