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

Commit

Permalink
Fix missing props
Browse files Browse the repository at this point in the history
  • Loading branch information
Wliu authored and Wliu committed Nov 17, 2017
1 parent e733917 commit dc6c994
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/popover-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ class PopoverComponent {

render () {
const {
isClientOutdated, initializationError,
isClientOutdated, hasInitializationError,
authenticationProvider, portalBindingManager,
commandRegistry, credentialCache, clipboard, workspace
} = this.props

let activeComponent
if (isClientOutdated) {
if (isClientOutdated()) {
if (!PackageOutdatedComponent) PackageOutdatedComponent = require('./package-outdated-component')
activeComponent = $(PackageOutdatedComponent, {
ref: 'packageOutdatedComponent',
workspace
})
} else if (initializationError) {
} else if (hasInitializationError()) {
if (!PackageInitializationErrorComponent) PackageInitializationErrorComponent = require('./package-initialization-error-component')
activeComponent = $(PackageInitializationErrorComponent, {
ref: 'packageInitializationErrorComponent'
})
} else if (this.props.authenticationProvider && this.props.authenticationProvider.isSignedIn()) {
} else if (authenticationProvider.isSignedIn()) {
if (!PortalListComponent) PortalListComponent = require('./portal-list-component')
activeComponent = $(PortalListComponent, {
ref: 'portalListComponent',
Expand Down
4 changes: 2 additions & 2 deletions lib/portal-status-bar-indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class PortalStatusBarIndicator {
function buildElement (props) {
const anchor = document.createElement('a')
anchor.classList.add('PortalStatusBarIndicator', 'inline-block')
if (props.isClientOutdated) anchor.classList.add('outdated')
if (props.initializationError) anchor.classList.add('initialization-error')
if (props.isClientOutdated()) anchor.classList.add('outdated')
if (props.hasInitializationError()) anchor.classList.add('initialization-error')

const icon = document.createElement('span')
icon.classList.add('icon', 'icon-radio-tower')
Expand Down
5 changes: 4 additions & 1 deletion lib/teletype-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ class TeletypePackage {
async consumeStatusBar (statusBar) {
const getPortalBindingManager = async () => await this.getPortalBindingManager()
const getAuthenticationProvider = async () => await this.getAuthenticationProvider()
const isClientOutdated = () => this.isClientOutdated
const hasInitializationError = () => this.initializationError
if (!PortalStatusBarIndicator) PortalStatusBarIndicator = require('./portal-status-bar-indicator')
this.portalStatusBarIndicator = new PortalStatusBarIndicator({
statusBar,
getPortalBindingManager,
getAuthenticationProvider,
isClientOutdated: this.isClientOutdated,
isClientOutdated,
initializationError,
tooltipManager: this.tooltipManager,
commandRegistry: this.commandRegistry,
clipboard: this.clipboard,
Expand Down

0 comments on commit dc6c994

Please sign in to comment.