|
1 | 1 | import {
|
2 |
| - EmptyObject, |
3 | 2 | assign,
|
4 | 3 | guidFor,
|
5 | 4 | dictionary,
|
@@ -144,11 +143,11 @@ const EmberRouter = EmberObject.extend(Evented, {
|
144 | 143 | this.currentRouteName = null;
|
145 | 144 | this.currentPath = null;
|
146 | 145 |
|
147 |
| - this._qpCache = new EmptyObject(); |
| 146 | + this._qpCache = Object.create(null); |
148 | 147 | this._resetQueuedQueryParameterChanges();
|
149 | 148 | this._handledErrors = dictionary(null);
|
150 |
| - this._engineInstances = new EmptyObject(); |
151 |
| - this._engineInfoByRoute = new EmptyObject(); |
| 149 | + this._engineInstances = Object.create(null); |
| 150 | + this._engineInfoByRoute = Object.create(null) |
152 | 151 | },
|
153 | 152 |
|
154 | 153 | /*
|
@@ -571,7 +570,7 @@ const EmberRouter = EmberObject.extend(Evented, {
|
571 | 570 | },
|
572 | 571 |
|
573 | 572 | _getHandlerFunction() {
|
574 |
| - let seen = new EmptyObject(); |
| 573 | + let seen = Object.create(null); |
575 | 574 | let owner = getOwner(this);
|
576 | 575 |
|
577 | 576 | return name => {
|
@@ -1024,7 +1023,7 @@ const EmberRouter = EmberObject.extend(Evented, {
|
1024 | 1023 | let engineInstances = this._engineInstances;
|
1025 | 1024 |
|
1026 | 1025 | if (!engineInstances[name]) {
|
1027 |
| - engineInstances[name] = new EmptyObject(); |
| 1026 | + engineInstances[name] = Object.create(null); |
1028 | 1027 | }
|
1029 | 1028 |
|
1030 | 1029 | let engineInstance = engineInstances[name][instanceId];
|
@@ -1483,7 +1482,7 @@ function appendLiveRoute(liveRoutes, defaultParentState, renderOptions) {
|
1483 | 1482 | let target;
|
1484 | 1483 | let myState = {
|
1485 | 1484 | render: renderOptions,
|
1486 |
| - outlets: new EmptyObject(), |
| 1485 | + outlets: Object.create(null), |
1487 | 1486 | wasUsed: false
|
1488 | 1487 | };
|
1489 | 1488 | if (renderOptions.into) {
|
@@ -1528,7 +1527,7 @@ function appendOrphan(liveRoutes, into, myState) {
|
1528 | 1527 | render: {
|
1529 | 1528 | name: '__ember_orphans__'
|
1530 | 1529 | },
|
1531 |
| - outlets: new EmptyObject() |
| 1530 | + outlets: Object.create(null) |
1532 | 1531 | };
|
1533 | 1532 | }
|
1534 | 1533 | liveRoutes.outlets.__ember_orphans__.outlets[into] = myState;
|
|
0 commit comments