Skip to content

Commit

Permalink
Use shouldApplyAdapter over isEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
thoov committed Apr 26, 2021
1 parent 23933f0 commit b4473c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/compat/src/v1-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ export interface V1AddonConstructor {
orderIdx: number
): V1Addon;

isEnabled?(addonInstance: any): boolean;
shouldApplyAdapter?(addonInstance: any): boolean;
}

class IntermediateBuild {
Expand Down
4 changes: 2 additions & 2 deletions packages/compat/src/v1-instance-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export default class V1InstanceCache {
return V1Addon;
}

if (AdapterClass.isEnabled) {
return AdapterClass.isEnabled(addonInstance) ? AdapterClass : V1Addon;
if (AdapterClass.shouldApplyAdapter) {
return AdapterClass.shouldApplyAdapter(addonInstance) ? AdapterClass : V1Addon;
}

return AdapterClass;
Expand Down

0 comments on commit b4473c9

Please sign in to comment.