skapi-js 1.0.62-beta.21 → 1.0.62-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,12 +155,17 @@ function Params(params, struct, required = []) {
155
155
  let toCheck = {};
156
156
  for (let s in struct) {
157
157
  if (p.hasOwnProperty(s)) {
158
- try {
159
- toCheck[s] = JSON.parse(JSON.stringify(p[s]));
160
- }
161
- catch (err) {
158
+ if (typeof p[s] === 'function') {
162
159
  toCheck[s] = p[s];
163
160
  }
161
+ else {
162
+ try {
163
+ toCheck[s] = JSON.parse(JSON.stringify(p[s]));
164
+ }
165
+ catch (err) {
166
+ toCheck[s] = p[s];
167
+ }
168
+ }
164
169
  }
165
170
  }
166
171
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skapi-js",
3
- "version": "1.0.62-beta.21",
3
+ "version": "1.0.62-beta.22",
4
4
  "description": "Skapi: Backend API Library for HTML frontend.",
5
5
  "main": "js/Main.js",
6
6
  "types": "js/Main.d.ts",