| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 07b6bf4 commit 59a15e8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,9 +75,7 @@ const { | |||
| 75 | 75 | StringPrototypeCharAt, | |
| 76 | 76 | } = primordials; | |
| 77 | 77 | ||
| 78 | - const { | ||
| 79 | - ERR_INVALID_ARG_TYPE | ||
| 80 | - } = require('internal/errors').codes; | ||
| 78 | + const { validateObject } = require('internal/validators'); | ||
| 81 | 79 | ||
| 82 | 80 | let base64Map; | |
| 83 | 81 | ||
@@ -317,9 +315,7 @@ function decodeVLQ(stringCharIterator) { | |||
| 317 | 315 | * @return {SourceMapV3} | |
| 318 | 316 | */ | |
| 319 | 317 | function cloneSourceMapV3(payload) { | |
| 320 | - if (typeof payload !== 'object') { | ||
| 321 | - throw new ERR_INVALID_ARG_TYPE('payload', ['Object'], payload); | ||
| 322 | - } | ||
| 318 | + validateObject(payload, 'payload'); | ||
| 323 | 319 | payload = { ...payload }; | |
| 324 | 320 | for (const key in payload) { | |
| 325 | 321 | if (ObjectPrototypeHasOwnProperty(payload, key) && | |
| Back | FazBrowse Home | New Git URL |
0 commit comments