Skip to content

Commit

Permalink
remove unneeded async function
Browse files Browse the repository at this point in the history
  • Loading branch information
deniak committed Dec 16, 2024
1 parent 6c278a3 commit 231061f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ Specberus.prototype.validate = function (options) {
.catch(err => this.throw(err.toString()));
};

Specberus.prototype.error = async function (rule, key, extra) {
Specberus.prototype.error = function (rule, key, extra) {
let name;
if (typeof rule === 'string') name = rule;
else name = rule.name;
const shortname = this.shortname || (await this.getShortname());
const shortname = this.getShortname();
if (
shortname !== undefined &&
this.exceptions.has(this.shortname, name, key, extra)
Expand Down Expand Up @@ -449,7 +449,7 @@ Specberus.prototype.getEditorIDs = function () {
return result;
};

Specberus.prototype.getShortname = async function () {
Specberus.prototype.getShortname = function () {
if (undefined !== this.shortname) {
return this.shortname;
}
Expand Down

0 comments on commit 231061f

Please sign in to comment.