mirror of
https://github.com/sourcey/spectacle.git
synced 2024-09-11 13:45:23 +03:00
fix example rendering
This commit is contained in:
parent
c7233ecee5
commit
f817d8b577
@ -118,19 +118,10 @@ var common = {
|
||||
return;
|
||||
}
|
||||
|
||||
// Keep depth-based circular reference detection around to
|
||||
// avoid errors in case '$ref's aren't being used
|
||||
// /usr/local/bin/node bin/spectacle -d test/fixtures/billing.yaml
|
||||
if (!options.depth) {
|
||||
options.depth = 0;
|
||||
}
|
||||
options.depth++;
|
||||
if (options.depth > 100) {
|
||||
return;
|
||||
}
|
||||
|
||||
options = _.cloneDeep(options);
|
||||
// Watch for circular references with '$ref' and use that instead of
|
||||
// trying to make a recursive example
|
||||
// /usr/local/bin/node bin/spectacle -d test/fixtures/billing.yaml
|
||||
if (!options.refsSeen) {
|
||||
options.refsSeen = [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user