PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
← All changes | src/AutoLaunch/functions/plugins.js +7 -9 3.2.1 → 3.2.2 View file →
@@ -97,21 +97,19 @@
97 97
98 98 try {
99 99 await fn(slug);
100 100 return true;
101 - } catch (_) {
102 - try {
103 - // try once more but get the slug first
104 - const { plugin } = await getPlugin(slug);
105 - await fn(plugin);
106 - return true;
107 - } catch (error) {
101 + } catch (error) {
102 + const report = (e) => {
108 103 digest({
109 - error,
104 + error: e,
110 105 details: { source: 'auto-launch', caller: 'activatePlugin' },
111 106 });
112 107 return false;
113 - }
108 + };
109 + const found = await getPlugin(slug).catch(() => undefined);
110 + if (!found?.plugin) return report(error);
111 + return fn(found.plugin).then(() => true, report);
114 112 }
115 113 };
116 114
117 115 // Exact match, not substring: woocommerce-payments would mask a missing woocommerce.