Error: domain is not defined #5

Closed
Rob--W opened this Issue Sep 9, 2012 · 1 comment

Projects

None yet

2 participants

@Rob--W

See https://github.com/SlexAxton/Jed/blob/master/jed.js#L97

    if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {
      throw new Error('Text domain set to non-existent domain: `' + domain + '`');
    }

must be:

    if ( this.options.domain && ! this.options.locale_data[ this.options.domain ] ) {
      throw new Error('Text domain set to non-existent domain: `' + this.options.domain + '`');
    }

Otherwise, the error "domain is undefined" is thrown when Jed attempts to throw a custom error.

@SlexAxton
Owner
@Rob--W Rob--W added a commit to Rob--W/Jed that referenced this issue Sep 9, 2012
@Rob--W Rob--W Fixed domain error #5 ; removed obsolete try-catch
Unless `parseInt` is replaced with an error-throwing function, `parseInt(val, 10);` will never trigger an error in JavaScript.
87731d4
@SlexAxton SlexAxton closed this Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment