diff options
author | Tobias Speicher <rootcommander@gmail.com> | 2022-03-24 16:17:46 +0100 |
---|---|---|
committer | Tobias Speicher <rootcommander@gmail.com> | 2022-03-24 16:17:46 +0100 |
commit | 11f437135a349c2993656302711526660084ae46 (patch) | |
tree | a2731ff198e39fa28a85c41f0fb10ddbd86df589 /cypress | |
parent | d239b379e2ed91971b7014baddb8c093f9210ba9 (diff) |
Replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/utils/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cypress/utils/index.js b/cypress/utils/index.js index cee81c0f..901c9bd0 100644 --- a/cypress/utils/index.js +++ b/cypress/utils/index.js @@ -30,6 +30,6 @@ const getSearchParams = url => { }, {}) } -const randHash = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10) +const randHash = () => Math.random().toString(36).replace(/[^a-z]+/g, '').slice(0, 10) export default { getSearchParams, randHash } |