mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
misc: remove useless codes
This commit is contained in:
parent
fceb30b7a3
commit
dbba872be2
@ -35,7 +35,7 @@ export default class ModuleContainer {
|
||||
const src = template.src || template
|
||||
const srcPath = path.parse(src)
|
||||
/* istanbul ignore if */
|
||||
if (!src || typeof src !== 'string' || !fs.existsSync(src)) {
|
||||
if (typeof src !== 'string' || !fs.existsSync(src)) {
|
||||
throw new Error('Template src not found:' + src)
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,6 @@ export default class Renderer {
|
||||
useMiddleware(m) {
|
||||
// Resolve
|
||||
const $m = m
|
||||
let src
|
||||
if (typeof m === 'string') {
|
||||
m = this.nuxt.requireModule(m)
|
||||
}
|
||||
@ -185,8 +184,6 @@ export default class Renderer {
|
||||
(typeof m.path === 'string' ? m.path : '')
|
||||
).replace(/\/\//g, '/')
|
||||
|
||||
// Inject $src and $m to final handler
|
||||
if (src) handler.$src = src
|
||||
handler.$m = $m
|
||||
|
||||
// Use middleware
|
||||
|
Loading…
Reference in New Issue
Block a user