diff --git a/packages/@ember/-internals/glimmer/lib/components/link-to.ts b/packages/@ember/-internals/glimmer/lib/components/link-to.ts index 6f467d045e3..9399a234e21 100644 --- a/packages/@ember/-internals/glimmer/lib/components/link-to.ts +++ b/packages/@ember/-internals/glimmer/lib/components/link-to.ts @@ -825,19 +825,6 @@ const LinkComponent = EmberComponent.extend({ return true; }), - _getModels(params: any[]) { - let modelCount = params.length - 1; - let models = new Array(modelCount); - - for (let i = 0; i < modelCount; i++) { - let value = params[i + 1]; - - models[i] = value; - } - - return models; - }, - /** The default href value to use while a link-to is loading. Only applies when tagName is 'a' @@ -888,11 +875,8 @@ const LinkComponent = EmberComponent.extend({ this.set('queryParams', queryParams); // 4. Any remaining indices (excepting `targetRouteName` at 0) are `models`. - if (params.length > 1) { - this.set('models', this._getModels(params)); - } else { - this.set('models', []); - } + params.shift(); + this.set('models', params); }, });