kunkunsh / kunkun-nuxt

An open source, cross-platform, extensible app launcher.
https://kunkun.sh
47 stars 8 forks source link

Fix aria-hidden error in console #69

Open HuakunShen opened 4 weeks ago

HuakunShen commented 3 weeks ago

https://github.com/unovue/shadcn-vue/issues/833

HuakunShen commented 3 weeks ago

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
};