Skip to content

Commit

Permalink
fix: prepare withMask function to React 19 ref breaking changes (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianorocha-dev committed Jun 18, 2024
1 parent de9f678 commit 4756fe8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/withMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import { Input, Mask, Options } from './types';

export const withMask = (mask: Mask, options?: Options) => (input: Input) => {
//
if (isServer) return input;
if (mask === null) return input;
if (isServer) return;
if (mask === null) return;

const maskInput = Inputmask(getMaskOptions(mask, options));

if (input) {
maskInput.mask(input);
}

return input;
};

0 comments on commit 4756fe8

Please sign in to comment.