Add: make dirtyReporter.clear accept a key

This commit is contained in:
eight 2017-10-16 16:05:41 +08:00
parent 831a4ef939
commit 0a6de8edb8

View File

@ -46,8 +46,12 @@ function dirtyReporter() {
}
}
function clear() {
dirty.clear();
function clear(obj) {
if (obj === undefined) {
dirty.clear();
} else {
dirty.delete(obj);
}
}
function isDirty() {