viewRaw, viewIcons, permissionsViewer: fix some edge cases (#1745)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
AutumnVN 2023-09-26 06:48:09 +07:00 committed by GitHub
parent 4c7a2ba340
commit f32d25b641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -119,7 +119,7 @@ const settings = definePluginSettings({
function MakeContextCallback(name: string) {
const callback: NavContextMenuPatchCallback = (children, props) => () => {
if (name === "Guild" && !props.guild) return;
if ((name === "Guild" && !props.guild) || (name === "User" && !props.user)) return;
const lastChild = children.at(-1);
if (lastChild?.key === "developer-actions") {
const p = lastChild.props;