Skip to content

Commit 60afc18

Browse files
author
daniel.santos
committed
refactor: Remove util.inherits #70
1 parent 9460888 commit 60afc18

File tree

4 files changed

+3416
-67
lines changed

4 files changed

+3416
-67
lines changed

lib/errors/oauth-error.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ class OAuthError extends Error {
2424
if (!message || message.length === 0) {
2525
message = http.STATUS_CODES[properties.code];
2626
}
27+
28+
super(message, properties);
29+
2730
this.code = this.status = this.statusCode = properties.code;
2831
this.message = message;
2932
for (const key in properties) {
3033
if (key !== 'code') {
3134
this[key] = properties[key];
3235
}
3336
}
37+
3438
Error.captureStackTrace(this, OAuthError);
3539
}
3640
}

lib/grant-types/authorization-code-grant-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,4 @@ class AuthorizationCodeGrantType extends AbstractGrantType {
198198
* Export constructor.
199199
*/
200200

201-
export default AuthorizationCodeGrantType;
201+
module.exports = AuthorizationCodeGrantType;

0 commit comments

Comments
 (0)