  We present an algorithm that mitigates the effects of charge migration due to
the "brighter-fatter effect'' (BFE) that occurs for highly illuminated stars in
the Teledyne HAWAII-2RG detectors used in the NIRCam, NIRISS, and NIRSpec
science instruments aboard the James Webb Space Telescope (JWST). The impact of
this effect is most significant for photometry and spectrophotometry of bright
stars in data for which the point spread function (PSF) is undersampled, which
is the case for several observing modes of the NIRISS instrument. The main
impact of the BFE to NIRISS data is incorrect count rate determinations for
pixels in the central regions of PSFs of bright stars due to jump detections
that are caused by charge migration from peak pixels to surrounding pixels. The
effect is especially significant for bright compact sources in resampled,
distortion-free images produced by the drizzle algorithm: quantitatively,
apparent flux losses of $>$ 50% can occur in such images due to the BFE. We
describe the algorithm of the "charge_migration'' mitigation step that has been
implemented in version 10.0 of the operational JWST calibration pipeline as of
Dec 5, 2023. We illustrate the impact of this step in terms of the resulting
improvements of the precision of imaging photometry of point sources. The
algorithm renders the effects of the BFE on photometry and surface brightness
measurements to stay within 1%.
