(msg, type)
| 6220 | |
| 6221 | // Local helper so we ALWAYS see something (toast or alert) |
| 6222 | const safeToast = (msg, type) => { |
| 6223 | try { |
| 6224 | if (typeof showToast === "function") { |
| 6225 | showToast(msg, 7000); |
| 6226 | } else { |
| 6227 | alert(msg); |
| 6228 | } |
| 6229 | } catch (e) { |
| 6230 | console.error("showToast failed, falling back to alert", e); |
| 6231 | alert(msg); |
| 6232 | } |
| 6233 | }; |
| 6234 | |
| 6235 | let modal = document.getElementById("adminUserHubModal"); |
| 6236 | if (!modal) { |
no test coverage detected