Skip to content

Commit 0cf3efa

Browse files
authored
Fixed a weird bug with the in operator
1 parent 2e73124 commit 0cf3efa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "canvas-constructor",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "A ES6 class for node-canvas with built-in functions and chained methods.",
55
"main": "index.js",
66
"scripts": {

src/canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class CanvasConstructor {
8282
* @chainable
8383
*/
8484
addImage(buffer, x, y, width, height, options = {}) {
85-
if ('type' in options) {
85+
if (options.type) {
8686
if (options.type === 'round') return this.addRoundImage(buffer, x, y, width, height, options.radius);
8787
if (options.type === 'bevel') return this.addBevelImage(buffer, x, y, width, height, options.radius);
8888
}

0 commit comments

Comments
 (0)