object -> array
This commit is contained in:
		
							
								
								
									
										2
									
								
								dist/router.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/router.js
									
									
									
									
										vendored
									
									
								
							@@ -70,7 +70,7 @@ export default class Router {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    use(obj) {
 | 
					    use(obj) {
 | 
				
			||||||
        if (obj instanceof Router) {
 | 
					        if (obj instanceof Router) {
 | 
				
			||||||
            this.routes = Object.assign(Object.assign({}, this.routes), obj.routes);
 | 
					            this.routes = [...this.routes, ...obj.routes];
 | 
				
			||||||
            this.sortRoutes();
 | 
					            this.sortRoutes();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (obj instanceof Tpl) {
 | 
					        if (obj instanceof Tpl) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,7 +95,7 @@ export default class Router {
 | 
				
			|||||||
   */
 | 
					   */
 | 
				
			||||||
  use(obj: Router | Tpl): void {
 | 
					  use(obj: Router | Tpl): void {
 | 
				
			||||||
    if(obj instanceof Router) {
 | 
					    if(obj instanceof Router) {
 | 
				
			||||||
      this.routes = { ...this.routes, ...obj.routes };
 | 
					      this.routes = [ ...this.routes, ...obj.routes ];
 | 
				
			||||||
      this.sortRoutes();
 | 
					      this.sortRoutes();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if(obj instanceof Tpl) {
 | 
					    if(obj instanceof Tpl) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user