mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
fix(module): correct errors when template is Object
This commit is contained in:
parent
3b4955152e
commit
05efd73136
@ -28,7 +28,7 @@ export default class ModuleContainer {
|
|||||||
addTemplate(template) {
|
addTemplate(template) {
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (!template) {
|
if (!template) {
|
||||||
throw new Error('Invalid template:' + template)
|
throw new Error('Invalid template:' + JSON.stringify(template))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate & parse source
|
// Validate & parse source
|
||||||
@ -36,7 +36,7 @@ export default class ModuleContainer {
|
|||||||
const srcPath = path.parse(src)
|
const srcPath = path.parse(src)
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (!src || typeof src !== 'string' || !fs.existsSync(src)) {
|
if (!src || typeof src !== 'string' || !fs.existsSync(src)) {
|
||||||
throw new Error('Template not found:' + template)
|
throw new Error('Template src not found:' + src)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate unique and human readable dst filename
|
// Generate unique and human readable dst filename
|
||||||
|
Loading…
Reference in New Issue
Block a user