mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
replacing the deprecated substr() with slice() (#4687)
This commit is contained in:
1 parent
eb93a2eee7
commit
66d0a354b1
2 files changed
+2
-2
No files matched your search
@@ -140,7 +140,7 @@ export class CustomResourceDefinition extends KubeObject {
|
||||
getResourceTitle() {
|
||||
const name = this.getPluralName();
|
||||
|
||||
return name[0].toUpperCase() + name.substr(1);
|
||||
return name[0].toUpperCase() + name.slice(1);
|
||||
}
|
||||
|
||||
getGroup() {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// Create random system name
|
||||
|
||||
export function getRandId({ prefix = "", suffix = "", sep = "_" } = {}) {
|
||||
const randId = () => Math.random().toString(16).substr(2);
|
||||
const randId = () => Math.random().toString(16).slice(2);
|
||||
|
||||
return [prefix, randId(), suffix].filter(s => s).join(sep);
|
||||
}
|
||||
Reference in new issue
Block a user