@electerm/electerm-react 2.16.6 → 2.16.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -152,9 +152,9 @@ export default function QuickCommandsFooterBox (props) {
152
152
  return null
153
153
  }
154
154
  const all = props.currentQuickCommands
155
- if (!all.length) {
156
- return renderNoCmd()
157
- }
155
+ // if (!all.length) {
156
+ // return renderNoCmd()
157
+ // }
158
158
  const keyword0 = keyword.toLowerCase()
159
159
  const filtered = filterArray(all, keyword0, label)
160
160
  const sorted = qmSortByFrequency
@@ -226,6 +226,9 @@ export default function QuickCommandsFooterBox (props) {
226
226
  </Flex>
227
227
  <div className={cls}>
228
228
  {sorted.map(renderItem)}
229
+ {
230
+ !sorted.length && renderNoCmd()
231
+ }
229
232
  </div>
230
233
  </div>
231
234
  </div>
@@ -215,7 +215,7 @@ export default class TerminalCmdSuggestions extends Component {
215
215
  history = [],
216
216
  batch = [],
217
217
  quick = []
218
- } = this.props.suggestions
218
+ } = this.props.suggestions || {}
219
219
  const res = []
220
220
  this.state.aiSuggestions
221
221
  .forEach(item => {
@@ -177,8 +177,8 @@ class Store {
177
177
  get terminalCommandSuggestions () {
178
178
  const { store } = window
179
179
  const historyCommands = Array.from(store.terminalCommandHistory.keys())
180
- const batchInputCommands = store.batchInputs
181
- const quickCommands = store.quickCommands.reduce(
180
+ const batchInputCommands = store.batchInputs || []
181
+ const quickCommands = (store.quickCommands || []).reduce(
182
182
  (p, q) => {
183
183
  return [
184
184
  ...p,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "2.16.6",
3
+ "version": "2.16.8",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",