mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 10:51:44 +02:00
Add global variable to disable memoization at any time
This commit is contained in:
@@ -42,6 +42,10 @@ function memoize(object, properties) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object[property] = function (...args) {
|
object[property] = function (...args) {
|
||||||
|
if (window.__NO_MEMOIZE) {
|
||||||
|
return original.apply(this, args)
|
||||||
|
}
|
||||||
|
|
||||||
const keys = [property, ...args]
|
const keys = [property, ...args]
|
||||||
this.__cache = this.__cache || new Map()
|
this.__cache = this.__cache || new Map()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user