Skip to content

Commit

Permalink
fixed unrender
Browse files Browse the repository at this point in the history
  • Loading branch information
xeaone committed Apr 22, 2022
1 parent a565d7b commit d4167e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/element/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import tick from './tick.ts';

// type DataEvent<T> = T extends (arg: infer T) => any ? T : never;
type DataKeys = string | number | symbol;
type DataHandlers = 'render' | 'derender';
type DataHandlers = 'render' | 'unrender';

export const dataGet = function (event: any, reference: string, target: any, key: DataKeys, receiver?: any): any {
if (typeof key === 'symbol') return target[ key ];
Expand Down Expand Up @@ -31,7 +31,7 @@ export const dataDelete = function (event: any, reference: string, target: any,
Reflect.deleteProperty(target, key);
}

tick(event.bind(null, reference ? `${reference}.${key}` : `${key}`, 'derender'));
tick(event.bind(null, reference ? `${reference}.${key}` : `${key}`, 'unrender'));

return true;
};
Expand Down

0 comments on commit d4167e2

Please sign in to comment.