mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(picker): if opts are null, initialize to empty object
This commit is contained in:
@ -19,6 +19,9 @@ export class Picker extends ViewController {
|
||||
@Output() ionChange: EventEmitter<any>;
|
||||
|
||||
constructor(app: App, opts: PickerOptions = {}, config: Config) {
|
||||
if (!opts) {
|
||||
opts = {};
|
||||
}
|
||||
opts.columns = opts.columns || [];
|
||||
opts.buttons = opts.buttons || [];
|
||||
opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true;
|
||||
|
||||
Reference in New Issue
Block a user