Skip to content

Commit 66c9872

Browse files
authored
Merge pull request #81 from dr86ansixavier/bugfix/Issue80_InfiniteLoopForNestedObjectDeserialisation
Fixing infinite loop issue which occurred due to wrong fetch from array
2 parents 5f0b36f + 3a77184 commit 66c9872

File tree

5 files changed

+21
-161
lines changed

5 files changed

+21
-161
lines changed

dist/ObjectMapper.js

Lines changed: 17 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ObjectMapper.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 147 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-object-mapper",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"description": "A TypeScript library to serialize and deserialize JSON objects in a fast and non-recursive way",
55
"repository": {
66
"type": "git",

src/main/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export namespace ObjectMapper {
4141
converstionFunctionsArray.push(struct);
4242
});
4343

44-
let conversionFunctionStructure: ConversionFunctionStructure = converstionFunctionsArray[0];
44+
let conversionFunctionStructure: ConversionFunctionStructure = (converstionFunctionsArray.length > 0)? converstionFunctionsArray.pop() : undefined;
4545

4646
// tslint:disable-next-line:triple-equals
4747
while (conversionFunctionStructure != undefined) {

0 commit comments

Comments
 (0)