Description: Fix int32 type
Author: Xavier Guimard <yadd@debian.org>
Bug: https://github.com/astro/node-stringprep/issues/97
Bug-Debian: https://bugs.debian.org/895029
Forwarded: https://github.com/astro/node-stringprep/issues/97
Last-Update: 2019-01-10

--- a/node-stringprep.cc
+++ b/node-stringprep.cc
@@ -194,7 +194,7 @@
   if (info.Length() >= 2 && info[0]->IsString() && info[1]->IsInt32())
   {
     String::Value str(info[0]->ToString());
-    int32_t options = info[1]->ToInt32()->Value();
+    int32_t options = Nan::To<int32_t>(info[1]).FromJust();
     UErrorCode error = U_ZERO_ERROR;
     UIDNA *uidna = uidna_openUTS46(options, &error);
     if (U_FAILURE(error))
@@ -252,7 +252,7 @@
   if (info.Length() >= 2 && info[0]->IsString() && info[1]->IsInt32())
   {
     String::Value str(info[0]->ToString());
-    int32_t options = info[1]->ToInt32()->Value();
+    int32_t options = Nan::To<int32_t>(info[1]).FromJust();
     UErrorCode error = U_ZERO_ERROR;
     UIDNA *uidna = uidna_openUTS46(options, &error);
     if (U_FAILURE(error))
