We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea8f89f commit 24aeb2cCopy full SHA for 24aeb2c
JavaScript/1-file-storage.js
@@ -6,7 +6,7 @@ const readline = require('readline');
6
class Database {
7
constructor() {
8
const proto = Object.getPrototypeOf(this);
9
- if (proto === Database) {
+ if (proto.constructor === Database) {
10
throw new Error('abstract class should not be instanciated');
11
}
12
@@ -19,7 +19,7 @@ class Database {
19
class Cursor {
20
21
22
- if (proto === Cursor) {
+ if (proto.constructor === Cursor) {
23
24
25
this.current = 0;
0 commit comments