Skip to content

Commit

Permalink
Merge pull request #191 from grid-js/fix-server-storage-initiator
Browse files Browse the repository at this point in the history
fix(server): Server initiator must remove functions from args
  • Loading branch information
afshinm authored Aug 2, 2020
2 parents f71e6d1 + 1cc336a commit 986a0be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gridjs",
"version": "1.15.0",
"version": "1.15.1",
"description": "Advanced table plugin",
"keywords": [
"grid",
Expand Down
7 changes: 6 additions & 1 deletion src/pipeline/initiator/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ class ServerInitiator extends PipelineProcessor<
}

_process(): ServerStorageOptions {
return this.props.serverStorageOptions;
return Object.entries(this.props.serverStorageOptions)
.filter(([_, val]) => typeof val !== 'function')
.reduce(
(acc, [k, v]) => ({ ...acc, [k]: v }),
{},
) as ServerStorageOptions;
}
}

Expand Down

0 comments on commit 986a0be

Please sign in to comment.