Skip to content

Commit

Permalink
NXJS-143: fix tests failing against LTS 2016 (8.10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ataillefer authored and troger committed Jun 11, 2018
1 parent 90bbd5d commit 05669d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/directory/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class Directory extends Base {
* @returns {Promise} A Promise object resolved with the updated {@link DirectoryEntry}.
*/
update(entry, opts = {}) {
// compatibility code for 7.10 where the `id` field is not set by the server
// works only if the `idFiel` of the directory is `id`
// compatibility code for 8.10 where the `id` field is not set by the server
// works only if the `idField` of the directory is `id`
const id = entry.id || entry.properties.id;
opts.body = {
id,
Expand Down
6 changes: 3 additions & 3 deletions lib/directory/entry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const extend = require('extend');
const Base = require('../base');

const { LTS_2016 } = require('../server-version');
const { LTS_2017 } = require('../server-version');

/**
* The `DirectoryEntry` class wraps a directory entry.
Expand All @@ -22,9 +22,9 @@ class DirectoryEntry extends Base {
this.properties = {};
this._dirtyProperties = {};
const { serverVersion } = this._directory._nuxeo;
// compatibility code for 7.10 (or unknown version) - make all properties dirty so that
// compatibility code for 8.10 (or unknown version) - make all properties dirty so that
// the `idField` will be passed when updating
if (!serverVersion || serverVersion.lt(LTS_2016)) {
if (!serverVersion || serverVersion.lt(LTS_2017)) {
this._dirtyProperties = extend({}, entry.properties);
}
extend(true, this, entry);
Expand Down

0 comments on commit 05669d4

Please sign in to comment.