Skip to content

Commit 409ad29

Browse files
author
Jonathan Gould
committed
Update index.js
1 parent e014241 commit 409ad29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function jsonapifyViaFind(hook, options) {
295295
if (mustParseAsSequelize(hook)) {
296296
hook.result.included = [];
297297
hook.result.data.forEach(function(data, index) {
298-
const jsonItem = JSON.stringify(data);
298+
const jsonItem = data;
299299
serialized = jsonapify(jsonItem, hook.service.Model, hook.path + '/' + jsonItem.id, data.$options);
300300
hook.result.data[index] = serialized.document;
301301
if (serialized.related) {
@@ -337,7 +337,7 @@ function jsonapifyViaFind(hook, options) {
337337
function jsonapifyViaGet(hook, options) {
338338
let serialized = {};
339339
if (mustParseAsSequelize(hook)) {
340-
const jsonItem = JSON.stringify(hook.result);
340+
const jsonItem = hook.result;
341341
serialized = jsonapify(jsonItem, hook.service.Model, hook.path + '/' + jsonItem.id, hook.result.$options);
342342
hook.result = { data: serialized.document, included: serialized.related };
343343
if (hook.result.included && !hook.result.included.length) {

0 commit comments

Comments
 (0)