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

The config's parse function returns an object with no enumerable properties. #96

Open
plameniv opened this issue Apr 20, 2020 · 1 comment · Fixed by #134
Open

The config's parse function returns an object with no enumerable properties. #96

plameniv opened this issue Apr 20, 2020 · 1 comment · Fixed by #134
Labels
bug Something isn't working M-core This issue is related to the core module P2 Priority 2
Milestone

Comments

@plameniv
Copy link
Collaborator

The config object returned by the parse function has no enumerable properties.

The following operations do not work:

  • console.log(config) prints the empty object;
  • const newConfig = { ...config } creates an empty object;
  • Object.keys(config) and Object.getOwnPropertyNames(config) don't return any values.

When the property is manually defined in the following manner, the converter functions stop working, i.e. 1m is not converted to 60 (seconds):

Object.defineProperty(target, key, {
     enumerable: true,
     writable: true,
     value: source[key],
});
target.__assignedProperties.add(key);
@plameniv plameniv added bug Something isn't working M-core This issue is related to the core module labels Apr 20, 2020
@plameniv plameniv added this to the 1.3 milestone Apr 20, 2020
@plameniv
Copy link
Collaborator Author

#69 addressed symptoms of this bug.

Once the bug is fixed, some of the changes in that PR may be reverted.

@sklose sklose linked a pull request Jun 13, 2020 that will close this issue
@sklose sklose modified the milestones: 1.3, 1.4 Oct 13, 2020
@plameniv plameniv added P1 Priority 1 P2 Priority 2 and removed P1 Priority 1 labels Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working M-core This issue is related to the core module P2 Priority 2
Development

Successfully merging a pull request may close this issue.

2 participants