Skip to content

Commit

Permalink
feat!: do not throw an error on unimplemented platforms (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tafelnl authored Jun 13, 2024
1 parent 2c1210f commit fc78c7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ios/Plugin/SafeAreaPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import Capacitor
@objc(SafeAreaPlugin)
public class SafeAreaPlugin: CAPPlugin {
@objc func enable(_ call: CAPPluginCall) {
call.unimplemented("Not implemented on iOS.")
call.resolve()
}

@objc func disable(_ call: CAPPluginCall) {
call.unimplemented("Not implemented on iOS.")
call.resolve()
}
}
4 changes: 2 additions & 2 deletions src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import type { Config, SafeAreaPlugin } from './definitions';
export class SafeAreaWeb extends WebPlugin implements SafeAreaPlugin {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async enable(_options: { config: Config }): Promise<void> {
throw this.unimplemented('Not implemented on web.');
return;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
async disable(_options: { config: Config }): Promise<void> {
throw this.unimplemented('Not implemented on web.');
return;
}
}

0 comments on commit fc78c7e

Please sign in to comment.