mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 18:39:40 +00:00
Refactor: Replace deprecated substr() with slice() (#27370)
This commit is contained in:
@@ -14,7 +14,7 @@ export default function parseAspectRatio(input: string) {
|
||||
}
|
||||
try {
|
||||
if (input.endsWith("%")) {
|
||||
return { w: 100, h: parseOrThrow(input.substr(0, input.length - 1)) };
|
||||
return { w: 100, h: parseOrThrow(input.slice(0, -1)) };
|
||||
}
|
||||
|
||||
const arr = input.replace(":", "x").split("x");
|
||||
|
||||
Reference in New Issue
Block a user