Skip to content

Commit

Permalink
Fixed layout and meta fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Nov 30, 2013
1 parent ad071fc commit 3ebcf26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/restapi.plugin.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ module.exports = (BasePlugin) ->

# Otherwise give the user specific fields
else
result.meta = file.getMeta()
result.meta = file.getMeta().toJSON()
for field in fields.concat(additionalFields)
result[field] = file.get(field)

# Get it working
if result.meta.layout
result.meta.layout = file.get('layoutRelativePath')

# return the result
return result

Expand Down

0 comments on commit 3ebcf26

Please sign in to comment.