mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Merge pull request #543 from VladimirTechMan/master
Very minor optimization to _getCache()
This commit is contained in:
commit
9baf66113e
@ -143,10 +143,10 @@ export abstract class Node {
|
||||
|
||||
// if not cached, we need to set it using the private getter method.
|
||||
if (cache === undefined) {
|
||||
this._cache[attr] = privateGetter.call(this);
|
||||
this._cache[attr] = cache = privateGetter.call(this);
|
||||
}
|
||||
|
||||
return this._cache[attr];
|
||||
return cache;
|
||||
}
|
||||
/*
|
||||
* when the logic for a cached result depends on ancestor propagation, use this
|
||||
|
Loading…
Reference in New Issue
Block a user