summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/theme.ts
diff options
context:
space:
mode:
authorokayurisotto <okayurisotto@proton.me>2023-07-14 07:59:54 +0900
committerGitHub <noreply@github.com>2023-07-14 07:59:54 +0900
commitc0dbc3b53fc9056e444f10dbc2d4e71d2d4fa439 (patch)
tree0038b0132ca8d6b561e518606c8e8d167b724f63 /packages/frontend/src/scripts/theme.ts
parentfix runtime error (diff)
downloadsharkey-c0dbc3b53fc9056e444f10dbc2d4e71d2d4fa439.tar.gz
sharkey-c0dbc3b53fc9056e444f10dbc2d4e71d2d4fa439.tar.bz2
sharkey-c0dbc3b53fc9056e444f10dbc2d4e71d2d4fa439.zip
refactor: `substr` -> `substring` (#11273)
Diffstat (limited to 'packages/frontend/src/scripts/theme.ts')
-rw-r--r--packages/frontend/src/scripts/theme.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/theme.ts b/packages/frontend/src/scripts/theme.ts
index f2e8253565..bc61256cac 100644
--- a/packages/frontend/src/scripts/theme.ts
+++ b/packages/frontend/src/scripts/theme.ts
@@ -98,7 +98,7 @@ function compile(theme: Theme): Record<string, string> {
function getColor(val: string): tinycolor.Instance {
// ref (prop)
if (val[0] === '@') {
- return getColor(theme.props[val.substr(1)]);
+ return getColor(theme.props[val.substring(1)]);
}
// ref (const)
@@ -109,7 +109,7 @@ function compile(theme: Theme): Record<string, string> {
// func
else if (val[0] === ':') {
const parts = val.split('<');
- const func = parts.shift().substr(1);
+ const func = parts.shift().substring(1);
const arg = parseFloat(parts.shift());
const color = getColor(parts.join('<'));