m.censor: work around a bunder bug (#2752)

This commit is contained in:
kfule 2022-03-01 19:27:47 +09:00 committed by GitHub
parent 53bedd1102
commit c8df665bcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -1658,7 +1658,8 @@ var compileTemplate = function(template) {
// return result2
// }
// ```
var magic = /^(?:key7|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove1)$/
// Words in RegExp literals are sometimes mangled incorrectly by the internal bundler, so use RegExp().
var magic = new RegExp("^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$")
var censor = function(attrs4, extras) {
var result2 = {}
if (extras != null) {