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

修正因v1.0.4版本新增的是否显示日志选项,在tmodjs初始化过程中产生的bug #129

Closed
wants to merge 1 commit into from

Conversation

lienjun
Copy link

@lienjun lienjun commented Feb 6, 2017

fix:
1、tmod在实例化过程中,获取package.json中依赖tmodjs版本号时的容错逻辑有判断遗漏,假如在dependencies中没有tmodjs的依赖,但是有其他第三方模块的依赖,而devDependencies中有tmodjs,但是没有对其进行容错处理,导致后续的replace出现can't read property 'tmodjs' of undefined的错误,也给第三方工具的集成造成不便。
2、v1.0.4新增"verbose": true选项,选择是否显示日志,产生的bug,主要是当tmod在获取配置信息时,这个时候tmodjs内部的options属性并未初始化,而获取配置信息出错时,调用打印日志的前提是判断this.options.verbose为真时才打印,此时this.options是没有初始化的,那么这就尴尬了,直接就出现'verbose' of undefined',使用者连为何错误都不知道。
虽然项目停更了,如果作者觉得合理,希望作者能合并这个请求。

fix:
1、tmod在实例化过程中,获取package.json中依赖tmodjs版本号时的容错逻辑有判断遗漏,假如在dependencies中没有tmodjs的依赖,但是有其他第三方模块的依赖,而devDependencies中有tmodjs,但是没有对其进行容错处理,导致后续的replace出现can't read property 'tmodjs' of undefined的错误,也给第三方工具的集成造成不便。
2、v1.0.4新增"verbose": true选项,选择是否显示日志,产生的bug,主要是当tmod在获取配置信息时,这个时候tmodjs内部的options属性并未初始化,而获取配置信息出错时,调用打印日志的前提是判断this.options.verbose为真时才打印,此时this.options是没有初始化的,那么这就尴尬了,直接就出现'verbose' of undefined',使用者连为何错误都不知道。
虽然项目停更了,如果作者觉得合理,希望作者能合并这个请求。
@lienjun lienjun changed the title Update tmod.js 修正因v1.0.4版本新增的是否显示日志选项,在tmodjs初始化过程中产生的bug Feb 12, 2017
@lienjun lienjun closed this by deleting the head repository Nov 30, 2022
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

Successfully merging this pull request may close these issues.

1 participant