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

[WebProfilerBundle] Fix AJAX panel with fetch requests #20724

Closed
wants to merge 2 commits into
base: 3.2
from

Conversation

Projects
None yet
6 participants
@OnekO
Contributor

OnekO commented Dec 2, 2016

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #20723
License MIT
Doc PR None
JS error using Request as window.fetch param
FIX: Bug trying to use a Request object as an string, because window.fetch implementation doesn't support Request as param, always is expecting url and params object.
@stof

This comment has been minimized.

Member

stof commented Dec 2, 2016

@OnekO I rebased your branch to base it on 3.2 rather than master, as you started the edition in master rather than your target branch.

@@ -243,6 +243,17 @@
var oldFetch = window.fetch;
window.fetch = function () {
var promise = oldFetch.apply(this, arguments);
var paramType = Object.prototype.toString.call(arguments[0]);
if (paramType === '[object Request]') {
arguments[0] = arguments[0].url;

This comment has been minimized.

@stof

stof Dec 2, 2016

Member

we should not mutate arguments. It can cause issues. We should be using local variables instead

This comment has been minimized.

@OnekO

OnekO Dec 2, 2016

Contributor

You are right, I changed it again.

@OnekO

This comment has been minimized.

Contributor

OnekO commented Dec 2, 2016

Thx :)

Update base_js.html.twig
Using local variables instead mutating arguments.

@OnekO OnekO changed the title from Patch 1 to [WebProfilerBundle] Fix AJAX panel with fetch requests Dec 2, 2016

@nicolas-grekas nicolas-grekas added this to the 3.2 milestone Dec 6, 2016

@fabpot

This comment has been minimized.

Member

fabpot commented Dec 13, 2016

Thank you @OnekO.

fabpot added a commit that referenced this pull request Dec 13, 2016

bug #20724 [WebProfilerBundle] Fix AJAX panel with fetch requests (On…
…ekO)

This PR was squashed before being merged into the 3.2 branch (closes #20724).

Discussion
----------

[WebProfilerBundle] Fix AJAX panel with fetch requests

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20723
| License       | MIT
| Doc PR        | None

Commits
-------

5527ee3 [WebProfilerBundle] Fix AJAX panel with fetch requests

@fabpot fabpot closed this Dec 13, 2016

@fabpot fabpot referenced this pull request Dec 13, 2016

Merged

Release v3.2.1 #20897

ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018

bug symfony#20724 [WebProfilerBundle] Fix AJAX panel with fetch reque…
…sts (OnekO)

This PR was squashed before being merged into the 3.2 branch (closes symfony#20724).

Discussion
----------

[WebProfilerBundle] Fix AJAX panel with fetch requests

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#20723
| License       | MIT
| Doc PR        | None

Commits
-------

5527ee3 [WebProfilerBundle] Fix AJAX panel with fetch requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment