hexo-swpp 2.5.1 → 2.5.2

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.
@@ -160,8 +160,8 @@ module.exports = (hexo, config, pluginConfig, swRules) => {
160
160
  postcss.parse(text).walkDecls(decl => {
161
161
  if (decl.value.includes('url')) {
162
162
  decl.value.match(/url\(([^)]+)\)/g)
163
- .map(it => it.match(/^(url\(['"])/) ? it.substring(5, it.length - 2) : it.substring(4, it.length - 1))
164
- .forEach(link => handleLink(link))
163
+ ?.map(it => it.match(/^(url\(['"])/) ? it.substring(5, it.length - 2) : it.substring(4, it.length - 1))
164
+ ?.forEach(link => handleLink(link))
165
165
  }
166
166
  })
167
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-swpp",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "hexo-log": "^3.0.0",