Skip to content

Commit ada7a39

Browse files
authored
Merge pull request #31 from inlet/fix-cursor-prop
Fix cursor prop
2 parents 90ca1ad + 4bd89d9 commit ada7a39

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utils/props.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const PROPS_DISPLAY_OBJECT = {
2828
alpha: 1,
2929
buttonMode: false,
3030
cacheAsBitmap: false,
31-
cursor: 'auto',
31+
cursor: null,
3232
filterArea: null,
3333
filters: null,
3434
hitArea: null,
@@ -107,7 +107,7 @@ export function applyDefaultProps(instance, oldProps, newProps) {
107107
if (!isNil(value)) {
108108
// set value if defined
109109
setValue(instance, prop, value)
110-
} else if (!isNil(instance[prop]) && !isNil(PROPS_DISPLAY_OBJECT[prop])) {
110+
} else if (!isNil(instance[prop]) && prop in PROPS_DISPLAY_OBJECT) {
111111
// is a default value, use that
112112
console.warn(`setting default value: ${prop}, from: ${instance[prop]} to: ${value} for`, instance)
113113
setValue(instance, prop, PROPS_DISPLAY_OBJECT[prop])

test/__snapshots__/props.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Object {
55
"alpha": 1,
66
"buttonMode": false,
77
"cacheAsBitmap": false,
8-
"cursor": "auto",
8+
"cursor": null,
99
"filterArea": null,
1010
"filters": null,
1111
"hitArea": null,

0 commit comments

Comments
 (0)