Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which work similarily but isn't deprecated

Signed-off-by: Tobias Speicher <[email protected]>
  • Loading branch information
CommanderRoot committed Nov 7, 2023
commit a611b2fd07b35f64522fa1e2c68ba8a162c60239
2 changes: 1 addition & 1 deletion apps/files/src/components/VirtualList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default Vue.extend({
}

// Get and consume reusable key or generate a new one
const key = unusedKeys.pop() || Math.random().toString(36).substr(2)
const key = unusedKeys.pop() || Math.random().toString(36).slice(2)
this.$_recycledPool[key] = item[this.dataKey]
return { key, item }
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default {
},
dropdownId() {
// Generate a unique ID for ARIA attributes
return `dropdown-${Math.random().toString(36).substr(2, 9)}`
return `dropdown-${Math.random().toString(36).slice(2, 11)}`
},
},
watch: {
Expand Down