mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +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) {
|
||||
if (window.__NO_MEMOIZE) {
|
||||
return original.apply(this, args)
|
||||
}
|
||||
|
||||
const keys = [property, ...args]
|
||||
this.__cache = this.__cache || new Map()
|
||||
|
||||
|
Reference in New Issue
Block a user