Skip to content

Commit

Permalink
Convert substr() usage to substring()
Browse files Browse the repository at this point in the history
String.prototype.substr() is a deprecated API.
  • Loading branch information
jelly authored and martinpitt committed Nov 21, 2024
1 parent e76870b commit ebc96f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Containers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ class Containers extends React.Component {
return {
expandedContent: <ListingPanel colSpan='4' tabRenderers={tabs} />,
columns,
initiallyExpanded: document.location.hash.substr(1) === container.Id,
initiallyExpanded: document.location.hash.substring(1) === container.Id,
props: {
key: container.Id + container.isSystem.toString(),
"data-row-id": container.Id + container.isSystem.toString(),
Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function truncate_id(id) {
if (!id) {
return "";
}
return id.substr(0, 12);
return id.substring(0, 12);
}

// this supports formatted strings (via Date.parse) or raw timestamps
Expand Down

0 comments on commit ebc96f9

Please sign in to comment.