Skip to content

Commit

Permalink
Plugins: allowlist setup method
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Jun 8, 2024
1 parent 403e72d commit 4918bb7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions panel/src/panel/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ import section from "@/mixins/section.js";
*/
export const installComponent = (app, name, options) => {
// make sure component has something to show
if (!options.template && !options.render && !options.extends) {
if (
!options.template &&
!options.render &&
!options.setup &&
!options.extends
) {
throw new Error(
`Neither template nor render method provided. Nor extending a component when loading plugin component "${name}". The component has not been registered.`
`Neither template, render nor setup method provided. Nor extending a component when loading plugin component "${name}". The component has not been registered.`
);
}

Expand Down

0 comments on commit 4918bb7

Please sign in to comment.