Skip to content

Commit

Permalink
check for key of control, v1.0.0-alpha.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Oct 19, 2018
1 parent d114ed3 commit f26bfeb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rete",
"version": "1.0.0-alpha.11",
"version": "1.0.0-alpha.12",
"description": "JavaScript framework",
"main": "build/rete.min.js",
"types": "src/index.d.ts",
Expand Down
6 changes: 4 additions & 2 deletions src/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ export class Control {

constructor(key) {
if (this.constructor === Control)
throw new TypeError('Can not construct abstract class.');

throw new TypeError('Can not construct abstract class');
if (!key)
throw new Error('The key parameter is missing in super() of Control ');

this.key = key;
this.data = {};
this.parent = null;
Expand Down

0 comments on commit f26bfeb

Please sign in to comment.