waibu-mpa 1.0.2 → 1.0.3

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.
@@ -161,6 +161,7 @@ class Component {
161
161
  }
162
162
 
163
163
  async buildSentence (sentence, params = {}, extra = {}) {
164
+ if (Array.isArray(sentence)) sentence = sentence.join(' ')
164
165
  const { renderString, minify } = this.plugin.app.waibuMpa
165
166
  if (extra.wrapped) sentence = '<w>' + sentence + '</w>'
166
167
  const opts = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-mpa",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MPA support for Waibu Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,7 +8,9 @@ async function logo (req, reply) {
8
8
  const { fastGlob, fs } = this.app.bajo.lib
9
9
  const id = camelCase(req.params.id)
10
10
  const plugin = getPlugin(id)
11
- const files = await fastGlob(`${plugin.dir.pkg}/bajo/logo${req.query.full ? '-full' : ''}.*`)
11
+ let type = ''
12
+ if (req.query.type) type = `-${req.query.type}`
13
+ const files = await fastGlob(`${plugin.dir.pkg}/bajo/logo${type}.*`)
12
14
  if (files.length === 0) throw this.error('notFound')
13
15
  const file = files[0]
14
16
  const mimeType = mime.getType(path.extname(file))