Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
use hasOwnProperty instead of requiring a "true" value for startval
Browse files Browse the repository at this point in the history
  • Loading branch information
joelnordell committed May 23, 2017
1 parent 26e2215 commit 0d71706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ JSONEditor.prototype = {
self.root.postBuild();

// Starting data
if(self.options.startval) self.root.setValue(self.options.startval);
if(self.options.hasOwnProperty('startval')) self.root.setValue(self.options.startval);

self.validation_results = self.validator.validate(self.root.getValue());
self.root.showValidationErrors(self.validation_results);
Expand Down

0 comments on commit 0d71706

Please sign in to comment.