Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxml标签内无属性时报错TypeError: Cannot convert undefined or null to object #1

Open
songyazhao opened this issue Jun 23, 2018 · 1 comment

Comments

@songyazhao
Copy link
Contributor

node@8.11.1
wxml-transformer@0.1.2

复现步骤:

const wt = require('wxml-transformer')
wt.toHtml(`<view id="con">{{ 123 }}</view>`) // 没问题
wt.toHtml(`<view>{{ 123 }}</view>`) // 报下面的错
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at elementToObject (D:\GitHubOther\Plz-shop\node_modules\wxml-transformer\dist\index.js:137:16)
    at D:\GitHubOther\Plz-shop\node_modules\wxml-transformer\dist\index.js:174:21
    at each (D:\GitHubOther\Plz-shop\node_modules\wxml-transformer\dist\index.js:12:13)
    at toObject (D:\GitHubOther\Plz-shop\node_modules\wxml-transformer\dist\index.js:173:5)
    at Object.toHtml (D:\GitHubOther\Plz-shop\node_modules\wxml-transformer\dist\index.js:274:22)
@songyazhao
Copy link
Contributor Author

Please release a new version to NPM

npm publish .

@songyazhao songyazhao reopened this Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant