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

Commit

Permalink
use extensions.createTab for tabs.create
Browse files Browse the repository at this point in the history
auditors: @bbondy
  • Loading branch information
bridiver committed Dec 15, 2016
1 parent 4f115f0 commit 52c12cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions app/browser/tabs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const appActions = require('../../js/actions/appActions')
const messages = require('../..//js/constants/messages')
const tabState = require('../common/state/tabState')
const {app, extensions, webContents} = require('electron')
const {app, extensions} = require('electron')
const { makeImmutable } = require('../common/state/immutableUtil')

let currentWebContents = {}
Expand Down Expand Up @@ -138,9 +138,9 @@ const api = {
let frameProps = action.get('frameProps')
let muted = action.get('muted')
let tabId = frameProps.get('tabId')
let webContents = api.getWebContents(tabId)
if (webContents) {
webContents.setAudioMuted(muted)
let tab = api.getWebContents(tabId)
if (tab) {
tab.setAudioMuted(muted)
let tabValue = getTabValue(tabId)
return tabState.updateTab(state, { tabValue })
}
Expand All @@ -162,8 +162,8 @@ const api = {

create: (createProperties, cb = null) => {
createProperties = makeImmutable(createProperties).toJS()
webContents.createTab(createProperties, (webContents) => {
cb && cb(webContents)
extensions.createTab(createProperties, (tab) => {
cb && cb(tab)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion js/components/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Frame extends ImmutableComponent {
}

get frame () {
return windowStore.getFrame(this.props.frameKey) || {}
return windowStore.getFrame(this.props.frameKey) || Immutable.fromJS({})
}

get braveryDefaults () {
Expand Down

2 comments on commit 52c12cb

@bbondy
Copy link
Member

@bbondy bbondy commented on 52c12cb Dec 15, 2016

Choose a reason for hiding this comment

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

++

@bbondy
Copy link
Member

@bbondy bbondy commented on 52c12cb Dec 15, 2016

Choose a reason for hiding this comment

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

Fix #6159

Please sign in to comment.