Skip to content

[Bug] .17 - Notify defaults #2322

Closed
Closed
@nicholaszuccarelli

Description

Hiya,

I'm having a problem specifying the defaults for the Notify plugin (inside of the quasar.conf file).

    framework: {
      config: {
        loadingBar: {
          color: 'blue-5',
          size: '5px'
        },
        notify: {
          color: 'blue-grey-10',
          icon: 'mdi-alert-circle-outline',
          timeout: 5000,
          position: 'bottom-left'
        },
        cordova: {
          iosStatusBarPadding: true
        }
      },

This is my object, however when I run the app, I am getting the following error:

Cannot convert undefined or null to object
(notify.js:165)
From what I can tell in this file, it is not passing a "defaults" variable in, but is assigning it to the object.

export default {
  create (opts) {
    if (isSSR) { return () => {} }
    return this.__vm.add(opts)
  },
  setDefaults (opts) {
    Object.assign(defaults, opts)
  },

  install (args) {
    if (isSSR) {
      args.$q.notify = () => {}
      args.$q.notify.setDefaults = () => {}
      return
    }

    init.call(this, args)

    args.cfg.notify && this.setDefaults(args.cfg.notify)

    args.$q.notify = this.create.bind(this)
    args.$q.notify.setDefaults = this.setDefaults
  }
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions