web: Fixed extension & local not detecting eachother correctly
This commit is contained in:
parent
bcfe59c351
commit
a02a81f80f
|
@ -62,15 +62,19 @@ export class PublicAPI {
|
|||
this.conflict = null;
|
||||
|
||||
if (prev !== undefined && prev !== null) {
|
||||
if (prev instanceof PublicAPI) {
|
||||
if (
|
||||
prev instanceof PublicAPI ||
|
||||
("version" in prev && prev.version == this.version)
|
||||
) {
|
||||
/// We're upgrading from a previous API to a new one.
|
||||
this.sources = prev.sources;
|
||||
this.config = prev.config;
|
||||
this.invoked = prev.invoked;
|
||||
this.conflict = prev.conflict;
|
||||
this.newestName = prev.newestName;
|
||||
const previous = <PublicAPI>prev;
|
||||
this.sources = previous.sources;
|
||||
this.config = previous.config;
|
||||
this.invoked = previous.invoked;
|
||||
this.conflict = previous.conflict;
|
||||
this.newestName = previous.newestName;
|
||||
|
||||
prev.superseded();
|
||||
previous.superseded();
|
||||
} else if (
|
||||
prev.constructor === Object &&
|
||||
prev.config instanceof Object
|
||||
|
@ -276,8 +280,8 @@ export class PublicAPI {
|
|||
sourceAPI: SourceAPI | undefined
|
||||
): PublicAPI {
|
||||
let publicAPI: PublicAPI;
|
||||
if (prevRuffle instanceof PublicAPI) {
|
||||
publicAPI = prevRuffle;
|
||||
if (prevRuffle?.constructor.name === PublicAPI.name) {
|
||||
publicAPI = <PublicAPI>prevRuffle;
|
||||
} else {
|
||||
publicAPI = new PublicAPI(prevRuffle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue