File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default function(system) {
1313 // setTimeout runs on the next tick
1414 setTimeout ( ( ) => {
1515 if ( localStorage . getItem ( CONTENT_KEY ) ) {
16- system . specActions . updateSpec ( localStorage . getItem ( CONTENT_KEY ) )
16+ system . specActions . updateSpec ( localStorage . getItem ( CONTENT_KEY ) , "local-storage" )
1717 } else if ( localStorage . getItem ( "ngStorage-SwaggerEditorCache" ) ) {
1818 // Legacy migration for swagger-editor 2.x
1919 try {
Original file line number Diff line number Diff line change @@ -40,8 +40,14 @@ export default function SemanticValidatorsPlugin({getSystem}) {
4040 } ,
4141 wrapActions : {
4242 validateSpec : ( ori , system ) => ( ...args ) => {
43- ori ( ...args )
44- debAll ( system )
43+ // verify editor plugin already loaded and function is available (for tests)
44+ if ( system . specSelectors . specOrigin ) {
45+ const specOrigin = system . specSelectors . specOrigin ( )
46+ if ( specOrigin === "editor" ) {
47+ ori ( ...args )
48+ debAll ( system )
49+ }
50+ }
4551 }
4652 }
4753 } ,
You can’t perform that action at this time.
0 commit comments