Title: Incorrect closure in V1Meta.prototype.query - a multi result query duplicates the last result · Issue #11 · versionone/VersionOne.SDK.JavaScript · GitHub
Open Graph Title: Incorrect closure in V1Meta.prototype.query - a multi result query duplicates the last result · Issue #11 · versionone/VersionOne.SDK.JavaScript
X Title: Incorrect closure in V1Meta.prototype.query - a multi result query duplicates the last result · Issue #11 · versionone/VersionOne.SDK.JavaScript
Description: Hi Guys, I've just discovered the SDK and am exploring developing 10 foot interfaces for our teams. I'm using an adapted query example and I have found all results are a duplication of the last result. This is caused by the generated jav...
Open Graph Description: Hi Guys, I've just discovered the SDK and am exploring developing 10 foot interfaces for our teams. I'm using an adapted query example and I have found all results are a duplication of the last res...
X Description: Hi Guys, I've just discovered the SDK and am exploring developing 10 foot interfaces for our teams. I'm using an adapted query example and I have found all results are a duplication of the ...
Opengraph URL: https://github.com/versionone/VersionOne.SDK.JavaScript/issues/11
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect closure in V1Meta.prototype.query - a multi result query duplicates the last result","articleBody":"Hi Guys,\n\nI've just discovered the SDK and am exploring developing 10 foot interfaces for our teams. \n\nI'm using an adapted query example and I have found all results are a duplication of the last result.\n\nThis is caused by the generated javascript code within V1Meta.prototype.query. \n\nThe problem is highlighted below:\n\n```\n for (_i = 0, _len = _ref.length; _i \u003c _len; _i++) {\n assetxml = _ref[_i];\n\n ... \n _results.push(_this.get_asset_class(found_type, function(err, Cls) {\n\n ...\n\n asset = _this.build_asset(Cls, assetxml);\n\n return options.success(asset);\n }));\n }\n```\n\nInside the `_this.get_asset_class()` callback, the variable `assetxml` will always reference the value of `_i` on the last iteration as the scope of `_i` is to the function. \n\nI'm not familiar with coffee script, so I cannot help you with the V1Meta.coffee source, but hopefully what I've pointed you towards will help. \n","author":{"url":"https://github.com/jamesjenner","@type":"Person","name":"jamesjenner"},"datePublished":"2014-08-25T09:10:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/11/VersionOne.SDK.JavaScript/issues/11"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8883023a-420f-ca56-bc2f-af36fed1797d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FA0:37DD1D:52F71DC:708DD01:69732045 |
| html-safe-nonce | 1c9b837fda4bea1d8769e2303eb1a2e640084ccb7170b0205eb8cb2afe50fed7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkEwOjM3REQxRDo1MkY3MURDOjcwOEREMDE6Njk3MzIwNDUiLCJ2aXNpdG9yX2lkIjoiNjY3ODAyMTYwNDA3NzkzNjcwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | edae1bf5fb390212a9e108e99ccabcd544ab3912143e49ecd0ede1fb8774aa84 |
| hovercard-subject-tag | issue:41044858 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/versionone/VersionOne.SDK.JavaScript/11/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a227dc4bd4bffdbe9a9b6ab2329d8ba56ea93325d4e09eba1aa1da98491df13a/versionone/VersionOne.SDK.JavaScript/issues/11 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a227dc4bd4bffdbe9a9b6ab2329d8ba56ea93325d4e09eba1aa1da98491df13a/versionone/VersionOne.SDK.JavaScript/issues/11 |
| og:image:alt | Hi Guys, I've just discovered the SDK and am exploring developing 10 foot interfaces for our teams. I'm using an adapted query example and I have found all results are a duplication of the last res... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jamesjenner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4 |
| turbo-cache-control | no-preview |
| go-import | github.com/versionone/VersionOne.SDK.JavaScript git https://github.com/versionone/VersionOne.SDK.JavaScript.git |
| octolytics-dimension-user_id | 256040 |
| octolytics-dimension-user_login | versionone |
| octolytics-dimension-repository_id | 4371929 |
| octolytics-dimension-repository_nwo | versionone/VersionOne.SDK.JavaScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4371929 |
| octolytics-dimension-repository_network_root_nwo | versionone/VersionOne.SDK.JavaScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a5e2b48bd1260476599758f5d253b5d24092ab84 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width