Use shorthand syntax in main.js routes
This commit is contained in:
@@ -14,7 +14,7 @@ export default class Router {
|
||||
}
|
||||
|
||||
fire(route, fn = 'init', args) {
|
||||
let fire = route !== '' && this.routes[route] && typeof this.routes[route][fn] === 'function';
|
||||
const fire = route !== '' && this.routes[route] && typeof this.routes[route][fn] === 'function';
|
||||
if (fire) {
|
||||
this.routes[route][fn](args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user