Skip to content

Commit bab060a

Browse files
committed
Merge branch 'master' of github.com:JoshuaWise/better-sqlite3
2 parents a7a270e + 5c1e890 commit bab060a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/util.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ exports.wrap = (Class, methodName, wrapper) => {
1313
if (typeof originalMethod !== 'function') {
1414
throw new TypeError(`Missing method ${methodName}`);
1515
}
16-
Class.prototype[methodName] = wrapper(originalMethod);
16+
if (!originalMethod.alreadyWrapped) {
17+
Class.prototype[methodName] = wrapper(originalMethod);
18+
Class.prototype[methodName].alreadyWrapped = true;
19+
}
1720
};

0 commit comments

Comments
 (0)