Skip to content

Commit dab3248

Browse files
committedJun 4, 2022
fix: check typeof is string
1 parent 9d56363 commit dab3248

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/ScratchCard.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ScratchCard {
4040

4141
this.config = {...defaults, ...config};
4242
this.scratchType = this.config.scratchType;
43-
this.container = typeof selector === 'string' || selector instanceof String ?
43+
this.container = (typeof selector === 'string' || selector instanceof String) ?
4444
document.querySelector(String(selector)) : selector;
4545
this.position = [0, 0]; // init position
4646
this.readyToClear = false;

0 commit comments

Comments
 (0)
Failed to load comments.