Skip to content

Commit

Permalink
Merge pull request #22 from yofukashino/main
Browse files Browse the repository at this point in the history
Makes platform indicator's position more consistent
  • Loading branch information
Puyodead1 committed Jul 13, 2024
2 parents 1d2a74b + 93701a4 commit ffd74b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ function patchProfile(PlatformIndicatorProps: {
if (icon === null) return args; // to prevent adding an empty div
const a = <ErrorBoundary>{icon}</ErrorBoundary>;
profileHeader.props.children.unshift(a);
profileHeader.props.children.unshift = (...args: unknown[]) => {
const item = profileHeader.props.children.splice(0, 1);
Array.prototype.unshift.apply(profileHeader.props.children, args);
Array.prototype.unshift.apply(profileHeader.props.children, item);
return profileHeader.props.children.length;
};
return args;
});
}
Expand Down

0 comments on commit ffd74b8

Please sign in to comment.