Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Remove object assign in merge props #9481

Merged
merged 1 commit into from
Jun 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/renderer/components/common/messageBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class MessageBox extends React.Component {
props.cancelId = messageBoxDetail.get('cancelId')
props.isActive = frameStateUtil.isFrameKeyActive(currentWindow, tab.getIn(['frame', 'key']))

return Object.assign({}, ownProps, props)
return props
}

render () {
Expand Down
3 changes: 2 additions & 1 deletion app/renderer/components/frame/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ class Frame extends React.Component {
props.showMessageBox = tab && tab.get('messageBoxDetail')

// used in other functions
props.frameKey = ownProps.frameKey
props.urlBarFocused = frame && frame.getIn(['navbar', 'urlbar', 'focused'])
props.isAutFillContextMenu = contextMenu && contextMenu.get('type') === 'autofill'
props.isSecure = frame.getIn(['security', 'isSecure'])
Expand Down Expand Up @@ -956,7 +957,7 @@ class Frame extends React.Component {
props.tabUrl = tab && tab.get('url')
props.partitionNumber = frame.get('partitionNumber')

return Object.assign({}, ownProps, props)
return props
}

render () {
Expand Down
3 changes: 2 additions & 1 deletion app/renderer/components/navigation/browserAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class BrowserAction extends React.Component {

const props = {}
// used in renderer
props.extensionId = ownProps.extensionId
props.title = browserActions.get('title')
props.text = browserActions.get('text')
props.color = browserActions.get('color')
Expand All @@ -75,7 +76,7 @@ class BrowserAction extends React.Component {
props.popupWindowSrc = currentWindow.getIn(['popupWindowDetail', 'src'])
props.activeTabId = activeTabId

return Object.assign({}, ownProps, props)
return props
}

render () {
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/components/navigation/menuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class MenuBar extends React.Component {
props.contextMenuDetail = !!contextMenuDetail
props.lastFocusedSelector = currentWindow.getIn(['ui', 'menubar', 'lastFocusedSelector'])

return Object.assign({}, ownProps, props)
return props
}

render () {
Expand Down
3 changes: 2 additions & 1 deletion app/renderer/components/navigation/menuBarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class MenuBarItem extends React.Component {

const props = {}
// used in renderer
props.index = ownProps.index
props.selected = ownProps.index === selectedIndex
props.label = template.get('label')

Expand All @@ -60,7 +61,7 @@ class MenuBarItem extends React.Component {
props.lastFocusedSelector = currentWindow.getIn(['ui', 'menubar', 'lastFocusedSelector'])
props.selectedIndex = selectedIndex

return Object.assign({}, ownProps, props)
return props
}

render () {
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/components/navigation/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Navigator extends React.Component {
props.isNavigable = activeFrame && isNavigatableAboutPage(getBaseUrl(activeFrame.get('location')))
props.activeTabId = activeTabId

return Object.assign({}, ownProps, props)
return props
}

render () {
Expand Down