fixed infinite profile update bug

This commit is contained in:
Martina 2021-01-15 12:20:30 -08:00
parent e5deed73f8
commit 20fd0dafb0

View File

@ -35,7 +35,8 @@ export default class SceneProfile extends React.Component {
};
componentDidUpdate = async (prevProps) => {
if (this.props.data !== prevProps.data) {
if (this.props.data?.id && prevProps.data?.id && this.props.data.id !== prevProps.data.id) {
console.log("component did update scene profile");
await this.fetchProfile();
}
};