-
Notifications
You must be signed in to change notification settings - Fork 362
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
currentCallback is not a function #338
Comments
I just ran into the same problem about 20 minutes after you created the issue :) Temporary workaround that uses more memory: const mappingItems = [];
sourceMapConsumer_2.eachMapping((mappingItem) => mappingItems.push(mappingItem));
// The consumer can be destroyed before the for loop
sourceMapConsumer_2.destroy();
for (const mappingItem of mappingItems) {
const { source, column, line } = sourceMapConsumer_1.originalPositionFor({
column: mappingItem.originalColumn,
line: mappingItem.originalLine,
});
...
}
sourceMapConsumer_1.destroy(); |
@mjomble yes I do the same thing to work around, as mentioned in reference 1, It dit work. Wish mainteners have more gentler solution. |
@fitzgen great job, the master branch fix the issue, Looking forward to the release of the next version |
Published 0.7.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
os: win10
node: v8.5.0
source-map: 0.7.2
the below function will run into error currentCallback is not a function
error stack:
I guess it is caused by I invoke
originnalPositionFor
method ofconsumer_1
in theeachMapping
method ofconsumer_2
.and for your reference
sourceMapConsumer_1.originalPositionFor
from theeachMapping
, this will work wellthank you for your glance
The text was updated successfully, but these errors were encountered: