mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Fix a stray comma on File previews
Summary: There's a comma to the lower-left of my profile picture here: {F248962} This is on a page like https://secure.phabricator.com/F248948 What's happening is that some `render()` method is returning a valid result like `array($stuff, null)`. This is getting passed to JS as an array, which is implicitly `join()`'ing it into a string, adding a comma. Instead, make sure we render these to strings on the server side before shipping them to the client. Test Plan: No more comma on file previews. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D10974
This commit is contained in:
parent
a2126631f3
commit
bc5598865f
1 changed files with 6 additions and 0 deletions
|
@ -67,6 +67,12 @@ final class PhabricatorApplicationTransactionResponse
|
|||
$xactions = mpull($view->buildEvents(), 'render', 'getTransactionPHID');
|
||||
}
|
||||
|
||||
// Force whatever the underlying views built to render into HTML for
|
||||
// the Javascript.
|
||||
foreach ($xactions as $key => $xaction) {
|
||||
$xactions[$key] = hsprintf('%s', $xaction);
|
||||
}
|
||||
|
||||
$content = array(
|
||||
'xactions' => $xactions,
|
||||
'spacer' => PHUITimelineView::renderSpacer(),
|
||||
|
|
Loading…
Reference in a new issue