Skip to content

Commit

Permalink
Merge branch 'main' into desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyangliu committed Dec 21, 2024
2 parents 7ba4b6e + 4e45944 commit a469a98
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lib/vm-listener-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ const vmListenerHOC = function (WrappedComponent) {
this.props.vm.postIOData('userData', {username: this.props.username});
// Update device list
this.props.vm.extensionManager.getDeviceList().then(data => {
if (data) {
this.props.onSetDeviceData(makeDeviceLibrary(data));
}
});
this.props.onSetDeviceData(makeDeviceLibrary(data));
})
.catch(() => {
this.props.onSetDeviceData(makeDeviceLibrary());
});
}
componentDidUpdate (prevProps) {
if (prevProps.username !== this.props.username) {
Expand Down

0 comments on commit a469a98

Please sign in to comment.