Skip to content

Commit 98b0bab

Browse files
Cleanup references may fail when using 'decorate' #29
1 parent 94f266a commit 98b0bab

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/numeric-keyboard.ios.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ export class NumericKeyboard implements NumericKeyboardApi, TextAndDecimalSepara
9898
}
9999

100100
// clean up the references
101-
args.textField.on("unloaded", () => {
102-
_numkeyboard.splice(_numkeyboard.indexOf(this), 1);
103-
});
101+
if (args.textField.on) {
102+
args.textField.on("unloaded", () => {
103+
_numkeyboard.splice(_numkeyboard.indexOf(this), 1);
104+
});
105+
}
104106

105107
resolve();
106108
});

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-numeric-keyboard",
3-
"version": "4.2.2",
3+
"version": "4.2.3",
44
"description": "Handy and elegant numeric keyboard for iOS NativeScript apps. On Android we fall back to the regular numeric keyboard.",
55
"main": "numeric-keyboard",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)