Skip to content

Commit

Permalink
use substring instead of deprecated substr
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin committed Oct 6, 2022
1 parent 4fd227f commit 0a6eb68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/components/AddComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class AddComponent extends React.Component {
*/
function isComponentInstanced(entity, componentName) {
for (var component in entity.components) {
if (component.substr(0, component.indexOf('__')) === componentName) {
if (component.substring(0, component.indexOf('__')) === componentName) {
return true;
}
}
Expand Down

0 comments on commit 0a6eb68

Please sign in to comment.