Skip to content

Commit

Permalink
Fix error when using named extension after unnamed extension [fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed May 18, 2020
1 parent 69442f1 commit 0a7fc14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function classExtend(Class, extension) {

if (name) {
namedExtensions = Class[NAMED_EXTENSIONS];
const existingExtension = namedExtensions[name];
const existingExtension = namedExtensions && namedExtensions[name];
if (existingExtension) {
if (existingExtension.version !== extension.version) {
throw new Error(
Expand Down

0 comments on commit 0a7fc14

Please sign in to comment.