We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
'Controller'で終わるプロパティにコントローラインスタンスでないもの、またはdisposeされたコントローラインスタンスが格納されているようなコントローラをdisposeするとエラーが発生する。
// コントローラインスタンスでないものが格納されている例 h5.core.controller(document.body, { __name: 'A' }).readyPromise.done(function() { this.xxxController = {}; this.dispose(); // TypeError: Cannot read property 'isRoot' of undefined }); // コントローラインスタンスを格納していたがdisposeされてしまった例 h5.core.controller(document.body, { __name: 'A', __ready: function() { this.xxxController = h5.core.controller(this.rootElement, { __name: 'B' }); } }).readyPromise.done(function() { var that = this; this.xxxController.dispose().done(function() { that.dispose(); // TypeError: Cannot read property 'isRoot' of undefined }); });
The text was updated successfully, but these errors were encountered:
hifive#284 isChildControllerの判定文を修正しました。
f5e78f3
コントローラインスタンスかどうか(__controllerContextの有無)を判定するようにしました。 また自分自身を指していないこと(target!==controller)のチェックもするようにしました。
hifive#284 isChildControllerで自分自身のコントローラかどうか判定できるようにしました。
b50b1b8
disposeControllerで、子コントローラのdispose処理が終わってからプロパティにnull代入を行うようにしました。
hifive#284 コメント修正しました
ef14b90
hifive#284 テストを追加しました。
b796900
xxxControllerに子コントローラ以外のコントローラを持たせてdisposeが正しくできる事を確認するテストを追加しました。
hifive#284 setNullToControllerProperty(controller) -> nullify(obj) に変更。
87f166c
if文の不要なネストを無くしました。
hifive#284 変数名を変更し忘れていたので対応しました
587bce5
controller -> obj
fukudayasuo
No branches or pull requests
'Controller'で終わるプロパティにコントローラインスタンスでないもの、またはdisposeされたコントローラインスタンスが格納されているようなコントローラをdisposeするとエラーが発生する。
The text was updated successfully, but these errors were encountered: