-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
Reproduce
- Add a comment
- Refresh the page with cache enabled
Result
SOMETIMES I get an error:
VM110:726 Uncaught TypeError: Cannot read property 'data' of undefined
at HTMLSpanElement.eval (eval at _compileFunction (require-kernel.js?v=c6e36b0f:226), <anonymous>:726:15)
at Function.each (ace2_common.js?callback=require.define&v=c6e36b0f:750)
at jQuery.fn.init.each (ace2_common.js?callback=require.define&v=c6e36b0f:543)
at EpComments.localizeExistingComments (eval at _compileFunction (require-kernel.js?v=c6e36b0f:226), <anonymous>:713:15)
at Object.eval (eval at _compileFunction (require-kernel.js?v=c6e36b0f:226), <anonymous>:111:10)
at Object.trigger (html10n.js?v=c6e36b0f:106)
at html10n.js?v=c6e36b0f:716
at html10n.js?v=c6e36b0f:955
at each (html10n.js?v=c6e36b0f:745)
at Loader.window.html10n.Loader.load (html10n.js?v=c6e36b0f:1
Observations
- Happens sometimes, ONLY when cache is ENABLED
- It seems at when
localizeExistingCommentsruns, thecommentIdis set, BUTthis.commentsis empty.
Causes?
- Probably race condition as the localization and
getCommentsrace each other. IfgetCommentswins, the error occurs.
Possible fixes?
- Check that
this.commentsarray has the comment likecollectCommentsdoes. Do nothing if it does not exist. It adds no extra problems as there is an interval to check and localize comments. - Call
this.collectComments();in localizeExistingComments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
