function onBeforeRouteLeave(leaveGuard) {
    if (!getCurrentInstance()) {
        warn(
            "getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function"
        );