Skip to content

Commit

Permalink
Merge branch 'pr/512' Closes jdorn#512
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorn committed Sep 27, 2015
2 parents 3a6e6ae + 9678499 commit 4471e12
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 49 deletions.
5 changes: 5 additions & 0 deletions dist/jsoneditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 47 additions & 47 deletions dist/jsoneditor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jsoneditor.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ for(var i in JSONEditor.defaults.editors) {
JSONEditor.defaults.resolvers.unshift(function(schema) {
if(typeof schema.type !== "string") return "multiple";
});
// If the type is not set but properties are defined, we can infer the type is actually object
JSONEditor.defaults.resolvers.unshift(function(schema) {
// If the schema is a simple type
if(!schema.type && schema.properties ) return "object";
});
// If the type is set and it's a basic type, use the primitive editor
JSONEditor.defaults.resolvers.unshift(function(schema) {
// If the schema is a simple type
Expand Down

0 comments on commit 4471e12

Please sign in to comment.