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

WP-5850 Use hasProperty to detect sockjs.js #299

Merged
merged 2 commits into from
Jan 29, 2018

Conversation

evanweible-wf
Copy link
Contributor

Issue

Actually accessing the SockJS object on js.context throws because it ends up trying to call the object.

Solution

The proper way to check is to use js.context.hasProperty which will simply check to see if the SockJS object is available, which is all we're after.

Code Review

@Workiva/app-frameworks

@evanweible-wf evanweible-wf requested a review from a team as a code owner January 29, 2018 17:26
@rmconsole2-wf rmconsole2-wf changed the title Use hasProperty to detect sockjs.js WP-5850 Use hasProperty to detect sockjs.js Jan 29, 2018
@aviary-wf
Copy link

aviary-wf commented Jan 29, 2018

Raven

Number of Findings: 0

Magpie

Number of findings: 0

@@ -67,6 +74,8 @@ <h1>Echo</h1>
<pre id="logs"></pre>
</div>

<!--<script src="packages/sockjs_client_wrapper/sockjs.js"></script>-->
Copy link
Contributor

Choose a reason for hiding this comment

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

should these be committed as being commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I don't have a great way to dynamically add/remove the script via the example UI, so I figured this was a good middle ground for now.

@codecov-io
Copy link

codecov-io commented Jan 29, 2018

Codecov Report

Merging #299 into master will not change coverage.
The diff coverage is 100%.

@jayudey-wf
Copy link
Contributor

jayudey-wf commented Jan 29, 2018

QA +1

  • Testing instruction
  • Dev +1's
  • Dev/QA +10 with detail of what was tested
    • verified in test case that noticed the bug that this solution was working as expected
    • verified that socket example was still working as exepcted
  • Security review (if required)
  • Unit tests created/updated (n/a, dart2js context handling update)
  • All unit tests pass
  • Rosie has run and reports properly the release the ticket will be included in

Merging into master.

@jayudey-wf
Copy link
Contributor

@Workiva/release-management-pp

@rmconsole-wf rmconsole-wf merged commit 82523b9 into master Jan 29, 2018
@rmconsole-wf rmconsole-wf deleted the fix_sockjs_detection branch January 29, 2018 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants