Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
fix: l-model
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed Nov 27, 2020
1 parent 1357e6c commit 2d6961c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/directives/model.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { DirectiveArgs } from './IDirectiveArgs';

export const modelDirective = ({ el, value, view }: DirectiveArgs) => {
el.value = view[value];
value = value.slice('this.'.length);
if (el.value !== view[value]) {
el.value = view[value];
}
el.oninput = () => {
const isNumber = typeof view[value] === 'number' && !isNaN(el.value);
const isBoolean =
Expand Down

0 comments on commit 2d6961c

Please sign in to comment.