Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit a82e961

Browse files
committed
fix: ensure template is a proper object before fetching components.
1 parent 68c22ba commit a82e961

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,12 @@ const createCustomMethodHandler = (instance, method) => {
353353
instance.context.debug(
354354
`Attempting to run method "${method}" on template aliases: ${components.join(', ')}`
355355
)
356+
357+
// Make sure the template is an object
358+
const templateObject = await getTemplate({ template })
359+
356360
// Load template components
357-
const templateComponents = await getAllComponents(template)
361+
const templateComponents = await getAllComponents(templateObject)
358362

359363
// Get only the requested components ("component" input)
360364
const componentsToRun = Object.keys(templateComponents)

0 commit comments

Comments
 (0)