Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.

Commit f098b6f

Browse files
authored
Merge pull request #35 from deskbookers/develop
v2.2.1
2 parents 8723669 + be6ad72 commit f098b6f

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 2.2.1 - 2017-06-08
8+
### Fixed
9+
- URL encoding in IE11 and lower
10+
711
## 2.2.0 - 2017-05-29
812
### Added
913
- `Availability` resource

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "deskbookers",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Deskbookers API JavaScript SDK",
55
"main": "dist/index.js",
66
"scripts": {
7-
"test": "ava",
7+
"test": "ava -c 2",
88
"build": "rm -rf dist/*; babel src --out-dir dist",
99
"prepublish": "npm run build"
1010
},
@@ -29,6 +29,7 @@
2929
"md5-hex": "^1.3.0",
3030
"moment": "^2.17.1",
3131
"phpurlencode": "^1.0.0",
32+
"platform": "^1.3.4",
3233
"qs": "^6.3.0",
3334
"ramda": "^0.23.0",
3435
"rndm": "^1.2.0",

src/resources/Resource.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { signer, formatArgs } from '../utils/requests'
2+
import platform from 'platform'
23
import { get } from 'lodash'
34
import {
45
DeskbookersError,
@@ -51,7 +52,9 @@ export default class Resource {
5152
__fields: fields,
5253
...params
5354
}
54-
const queryStr = formatArgs(args, options.method === 'POST')
55+
56+
const shouldEncodeArgs = options.method === 'POST' || (platform.name === 'IE' && parseFloat(platform.version) < 12)
57+
const queryStr = formatArgs(args, shouldEncodeArgs)
5558
const pathFixed = path.replace(/^\/+|\/+$/, '')
5659

5760
let url

test/availability.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function client (login = false) {
3535
return deskbookers
3636
}
3737

38-
test('listEvents', async t => {
38+
test('retrieve', async t => {
3939
// Prepare API
4040
const deskbookers = await client(true)
4141
t.truthy(deskbookers.session)

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,6 +2580,10 @@ pkg-dir@^1.0.0:
25802580
dependencies:
25812581
find-up "^1.0.0"
25822582

2583+
platform@^1.3.4:
2584+
version "1.3.4"
2585+
resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.4.tgz#6f0fb17edaaa48f21442b3a975c063130f1c3ebd"
2586+
25832587
plur@^1.0.0:
25842588
version "1.0.0"
25852589
resolved "https://registry.yarnpkg.com/plur/-/plur-1.0.0.tgz#db85c6814f5e5e5a3b49efc28d604fec62975156"

0 commit comments

Comments
 (0)