From 9f796b134b111408f26dffcbcd3c8c33afdb7416 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Sep 2019 10:08:46 -0700 Subject: [PATCH 1/2] fix the regex to include png and put the e in jpeg in the correct spot --- src/web-api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web-api.js b/src/web-api.js index e7d2795..8192628 100644 --- a/src/web-api.js +++ b/src/web-api.js @@ -100,10 +100,10 @@ class WebApi { if (image['image_type_id'] > 3) { throw new Error("Invalid image_type_id"); } - if (image['image_type_id'] > 1 && image['image'].match(/(\.je?pg)$/)) { + if (image['image_type_id'] > 1 && image['image'].match(/(\.jpe?g)|(\.png)$/)) { throw new Error("image_type_id mismatch"); } - if (image['image_type_id'] < 2 && !image['image'].match(/(\.je?pg)$/)) { + if (image['image_type_id'] < 2 && !image['image'].match(/(\.jpe?g)|(\.png)$/)) { throw new Error("image_type_id mismatch"); } }); From cdbac22da471d6b2acab84ecf21829810d8d0929 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Sep 2019 10:22:07 -0700 Subject: [PATCH 2/2] bump the package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0abefce..b40e28f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smile-identity-core", - "version": "0.2.3", + "version": "0.2.4", "description": "The official Smile Identity gem exposes two classes namely, the WebApi and Signature class.", "main": "index.js", "scripts": {