Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode support for web #25

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Unicode support for web #25

wants to merge 7 commits into from

Conversation

lucaboy
Copy link

@lucaboy lucaboy commented Sep 24, 2020

No description provided.

@@ -18,7 +18,6 @@ npm-debug.log*
.sass-cache/
.tmp/
.versions/
dist/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, why do you want to have dist folder included in git?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, i included the dist folder only to import easily the modified library from my github repo to my project. I opened the pull request only for the commit https://github.com/lucaboy/capacitor-secure-storage-plugin/commit/a742bb2f17cec1f21ef5a9af2e2e9f7121d5d4f8.

@@ -26,6 +26,10 @@ public class SecureStoragePlugin: CAPPlugin {
@objc func get(_ call: CAPPluginCall) {
let key = call.getString("key") ?? ""
let hasValue = KeychainWrapper.standard.hasValue(forKey: key)
call.success([
"value": KeychainWrapper.standard.string(forKey: key) ?? ""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if item with given key does not exist will it return null or empty string?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns empty string, but i just changed it to return null.

martinkasa
martinkasa previously approved these changes Nov 3, 2020
@martinkasa martinkasa dismissed their stale review November 3, 2020 08:07

approved by mistake

@martinkasa
Copy link
Owner

Hello @lucaboy, is this supose to be real pull request? or are you just making changes to your forked copy?

@cies
Copy link

cies commented Oct 21, 2021

Not using Exception when not strictly needed is always a good idea, IHMO. Returning null is a bit of a weak alternative as all types of errors are now simply combined into one undifferentiatable NULL value.

IMHO, best would be to have a typed Result response what has all error states (maybe a enum and a description String that possibly contains the error from the underlying library), and all success states (in this case only one: the value that belongs to the key).

https://developer.paypal.com/braintree/docs/reference/general/result-objects/node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants