Skip to content

Code for fixing some issues #106

arashv opened this Issue Nov 15, 2012 · 0 comments

2 participants

arashv commented Nov 15, 2012

Hi needim,

I found an issue in your code, or better call it some extra protection, and wrote a code to fix it. Thought you may include it in your next release.
The thing is if the user supports a wrong name for theme name, your plugin malfunctions and creates some errors, in order to fix that, I moved the definition for the default theme to the end of the jquery.noty.js file. Then commented the line below :

this.options.theme = $.noty.themes[this.options.theme];

and then added the below piece of code to init function :

        if($.noty.themes[this.options.theme] != null && $.noty.themes[this.options.theme] != undefined)
            this.options.theme = $.noty.themes[this.options.theme];
            this.options.theme = $.noty.themes["defaultTheme"];

Good luck

@needim needim closed this Aug 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.