Skip to content

Commit be36010

Browse files
committed
fix tests
1 parent 28bff8d commit be36010

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

spec/ParseObject.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ describe('Parse.Object testing', () => {
568568
);
569569
});
570570

571-
it('can increment array nested fields', async () => {
571+
it_only_db('mongo')('can increment array nested fields', async () => {
572572
const obj = new TestObject();
573573
obj.set('items', [ { value: 'a', count: 5 }, { value: 'b', count: 1 } ]);
574574
await obj.save();

src/Controllers/SchemaController.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,11 +1096,12 @@ export default class SchemaController {
10961096
maintenance?: boolean
10971097
) {
10981098
if (fieldName.indexOf('.') > 0) {
1099-
// "<array>.<index>" for Nested Array
1100-
// "<embedded document>.<field>" for Nested Object
1099+
// "<array>.<index>" for Nested Arrays
1100+
// "<embedded document>.<field>" for Nested Objects
1101+
// JSON Arrays are treated as Nested Objects
11011102
const [x, y] = fieldName.split('.');
11021103
fieldName = x;
1103-
if (!isNaN(y)) {
1104+
if (!isNaN(y) && !['sentPerUTCOffset', 'failedPerUTCOffset'].includes(fieldName)) {
11041105
type = 'Array';
11051106
} else {
11061107
type = 'Object';

0 commit comments

Comments
 (0)