Skip to content

Commit 311c994

Browse files
committed
make instance delegate method read-only
1 parent 767b7e3 commit 311c994

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/instance/constructor.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,10 @@ export default function ScrollReveal (options = {}) {
6060
}
6161

6262
this.pristine = true
63-
this.delegate = delegate.bind(this)
6463

65-
Object.defineProperty(this, 'version', {
66-
get: () => version,
67-
})
68-
69-
Object.defineProperty(this, 'noop', {
70-
get: () => false,
71-
})
64+
Object.defineProperty(this, 'delegate', { get: () => delegate.bind(this) })
65+
Object.defineProperty(this, 'version', { get: () => version })
66+
Object.defineProperty(this, 'noop', { get: () => false })
7267
}
7368

7469
ScrollReveal.isSupported = () => transformSupported() && transitionSupported()

0 commit comments

Comments
 (0)