Skip to content

Commit

Permalink
+ bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
wmakeev committed Jun 15, 2023
1 parent 2cfde69 commit f9e06f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion bundle/umd/moysklad.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ module.exports = stampit({
statics: {
getTimeString,
parseTimeString,
parseUrl,
buildFilter,
buildQuery,
MoyskladError,
Expand Down Expand Up @@ -1173,7 +1174,17 @@ module.exports = function parseUrl(...args) {
{ path: 'str or str arr' }
])

let { endpoint, api, apiVersion } = this.getOptions()
const isCalledOnInstance = !!(this && this.getOptions)

if (!url && !isCalledOnInstance) {
throw new MoyskladError(
'Для вызова статического метода parseUrl, необходимо передать url'
)
}

let { endpoint, api, apiVersion } = isCalledOnInstance
? this.getOptions()
: {}

let pathStr = ''
let queryStr = ''
Expand Down
Loading

0 comments on commit f9e06f4

Please sign in to comment.