1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 18:39:51 +02:00

Add global variable to disable memoization at any time

This commit is contained in:
Soreine
2016-11-03 13:18:36 +01:00
parent d58d7a0e10
commit 3d8000a53f

View File

@@ -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()