Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Fix aria-hidden error in console #69

Open
HuakunShen opened this issue Oct 25, 2024 · 2 comments
Open

Fix aria-hidden error in console #69

HuakunShen opened this issue Oct 25, 2024 · 2 comments

Comments

@HuakunShen
Copy link
Member

No description provided.

@HuakunShen HuakunShen changed the title Fix aria-hidden error in console, so annoying Fix aria-hidden error in console Oct 27, 2024
@HuakunShen
Copy link
Member Author

unovue/shadcn-vue#833

@HuakunShen
Copy link
Member Author

The only way I can think of to bypass the error message is overwriting console.error

const originalError = console.error;

console.error = function (...args) {
    if (args.some(arg => typeof arg === "string" && arg.includes("aria-hidden"))) {
        return; // Skip error messages with "aria-hidden"
    }
    originalError.apply(console, args); // Call the original error
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant