Skip to content

bug(common/models): cannot apply transform to null context 🐵 #10136

@sentry

Description

@sentry

Sentry Issue: KEYMAN-WEB-FH

TypeError: undefined is not an object (evaluating 'e.left')
  at None (blob:null/2ef37f8a-965f-4741-9ce2-793daf17264b:5:20146)

@jahorton on the analysis here.

Diving into the lm-worker minified source, I have been able to map the error to the following section:

export function applyTransform(transform: Transform, context: Context): Context {
// First, get the current context
let fullLeftContext = context.left || '';
let lLen = fullLeftContext.kmwLength();

Note line 10 in particular - that's the line that's failing. So... something's attempting to apply a transform to a null context. The natural question is, of course... "what?"


The section of minified code:

extendString();var SENTINEL_CODE_UNIT="\uFDD0";function applyTransform(r,e){
var t,n,i=e.left||"",a=i.kmwLength(),u=a<r.deleteLeft?a:r.deleteLeft,o=i.kmwSubstr(0,a-u) //...

The line-column identifier matches perfectly to i=e|.left - that is, with the caret between the e and the ..

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions