From 9a6930571c4e8f6501e6b49cf50ba9525760b507 Mon Sep 17 00:00:00 2001
From: Jonas Dellinger <jonas@dellinger.dev>
Date: Mon, 20 Jun 2022 15:29:40 +0200
Subject: Fix onDismount

---
 frontend/src/plugin-loader.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'frontend/src/plugin-loader.tsx')

diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index eb3344a3..c42065c7 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -111,11 +111,10 @@ class PluginLoader extends Logger {
   private async importReactPlugin(name: string) {
     let res = await fetch(`http://127.0.0.1:1337/plugins/${name}/frontend_bundle`);
     if (res.ok) {
-      let content = await eval(await res.text())(this.createPluginAPI(name));
+      let { name: _, content } = await eval(await res.text())(this.createPluginAPI(name));
       this.plugins.push({
         name: name,
-        icon: content.icon,
-        content: content.content,
+        ...content,
       });
     } else throw new Error(`${name} frontend_bundle not OK`);
   }
-- 
cgit v1.2.3

