Skip to content

Commit

Permalink
_dataUsed and _schemaUsed are saved in validatePrivate function
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-kubula committed Mar 20, 2015
1 parent f5878ec commit e6d408a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/validators/json-schema.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ class JsonSchema

#@private
validatePrivate: =>
@_dataUsed = @data
@_schemaUsed = @schema

if @jsonSchemaVersion == 'v3'
@validateSchemaV3()
else if @jsonSchemaVersion == 'v4'
Expand Down Expand Up @@ -191,9 +194,6 @@ class JsonSchema

#@private
validateSchemaV3: ->
@_dataUsed = @data
@_schemaUsed = @schema

try
return amanda.validate @data, @schema, json_schema_options, (error) =>
if error?.length > 0
Expand Down

0 comments on commit e6d408a

Please sign in to comment.