MCPcopy Create free account
hub / github.com/error311/FileRise / safeToast

Function safeToast

public/js/adminPanel.js:6222–6233  ·  view source on GitHub ↗
(msg, type)

Source from the content-addressed store, hash-verified

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) {

Callers 1

openAdminUserHubModalFunction · 0.85

Calls 1

showToastFunction · 0.70

Tested by

no test coverage detected