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

fix: Solve [object Object] on all labels #82

Merged
merged 3 commits into from
Nov 12, 2021

Conversation

carboneater
Copy link
Contributor

I might be a wee bit impatient.

Here's my take to solve #81

From Node REPL:

> Object.fromEntries(Object.entries(lokiLabels).map(([key,value]) => [key, value ? value.toString() : value]))
{ host: 'dev', env: 'test', key: 'value' }

> JSON.parse(JSON.stringify(lokiLabels, (key, value) => value ? value.toString() : value))
'[object Object]'

Fixes #81

I also tweaked a few related tests so there are less failing tests in a run.

@JaniAnttonen
Copy link
Owner

Not at all! Thanks for the fix and the tests, not sure if I'm proud seeing those fixtures :D

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.

Labels not correctly stringified in request
2 participants