Skip to content

Commit

Permalink
Added a filter to check param type
Browse files Browse the repository at this point in the history
  • Loading branch information
itssadon committed Oct 15, 2018
1 parent 36be725 commit af5e19f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ GladePay.prototype = {
if (func.params) {
// check args
func.params.filter(param => {
if (!param.includes("*")) return;
if (typeof param === "string") {
if (!param.includes("*")) return;
}

param = param.replace("*", "");
if (!(param in data)) {
Expand Down

0 comments on commit af5e19f

Please sign in to comment.