Comparing version 6.1.0 to 6.1.1
@@ -39,4 +39,5 @@ 'use strict'; | ||
var _routeInfo = ROUTE_INFOS.get(info); | ||
ROUTE_INFOS.set(info, createRouteInfoWithAttributes(_routeInfo, context)); | ||
return _routeInfo; | ||
var routeInfoWithAttribute = createRouteInfoWithAttributes(_routeInfo, context); | ||
ROUTE_INFOS.set(info, routeInfoWithAttribute); | ||
return routeInfoWithAttribute; | ||
} | ||
@@ -99,7 +100,13 @@ var routeInfo = { | ||
function createRouteInfoWithAttributes(routeInfo, context) { | ||
return Object.assign(routeInfo, { | ||
var objects = [{ | ||
get attributes() { | ||
return context; | ||
} | ||
}); | ||
}]; | ||
if (Object.isFrozen(routeInfo)) { | ||
objects.unshift({}, routeInfo); | ||
} else { | ||
objects.unshift(routeInfo); | ||
} | ||
return Object.assign.apply(null, objects); | ||
} | ||
@@ -106,0 +113,0 @@ |
@@ -10,4 +10,5 @@ import { Promise } from 'rsvp'; | ||
let routeInfo = ROUTE_INFOS.get(info); | ||
ROUTE_INFOS.set(info, createRouteInfoWithAttributes(routeInfo, context)); | ||
return routeInfo; | ||
let routeInfoWithAttribute = createRouteInfoWithAttributes(routeInfo, context); | ||
ROUTE_INFOS.set(info, routeInfoWithAttribute); | ||
return routeInfoWithAttribute; | ||
} | ||
@@ -68,7 +69,16 @@ let routeInfo = { | ||
function createRouteInfoWithAttributes(routeInfo, context) { | ||
return Object.assign(routeInfo, { | ||
get attributes() { | ||
return context; | ||
let objects = [ | ||
{ | ||
get attributes() { | ||
return context; | ||
}, | ||
}, | ||
}); | ||
]; | ||
if (Object.isFrozen(routeInfo)) { | ||
objects.unshift({}, routeInfo); | ||
} | ||
else { | ||
objects.unshift(routeInfo); | ||
} | ||
return Object.assign.apply(null, objects); | ||
} | ||
@@ -75,0 +85,0 @@ export default class InternalRouteInfo { |
{ | ||
"name": "router_js", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": | ||
@@ -5,0 +5,0 @@ "A lightweight JavaScript library is built on top of route-recognizer and rsvp.js to provide an API for handling routes", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
372637
5382