Skip to content

Commit

Permalink
fix(ngTableParams): parameters method returns incorrect object
Browse files Browse the repository at this point in the history
`parameters` method when called without arguments should return the current `ParamValues`,
but instead is returning a reference to `this`
  • Loading branch information
ccrowhurstram committed Dec 22, 2016
1 parent 0966428 commit 3ca6852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ngTableParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export class NgTableParams<T> {
parameters(newParameters?: ParamValues<T> | { [name: string]: string }, parseParamsFromUrl?: boolean): this
parameters(newParameters?: ParamValues<T> | { [name: string]: string }, parseParamsFromUrl?: boolean): ParamValues<T> | this {
parseParamsFromUrl = parseParamsFromUrl || false;
if (typeof newParameters !== undefined) {
if (newParameters !== undefined) {
for (const key in newParameters) {
let value = newParameters[key];
if (parseParamsFromUrl && key.indexOf('[') >= 0) {
Expand Down

0 comments on commit 3ca6852

Please sign in to comment.