Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Invalid assumption of a class to be a factory #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ function isUpperCase(char) {


function isClass(clsOrFunction) {
if (clsOrFunction.name) {
if (Object.keys(clsOrFunction.prototype).length > 0){
return true;
}else if (clsOrFunction.name) {
return isUpperCase(clsOrFunction.name.charAt(0));
}

return Object.keys(clsOrFunction.prototype).length > 0;
return false;
}


Expand Down