Seemingly harmless Uncaught SyntaxError: Unexpected identifier

Hey guys,
Basically, A plugin that gets rid of the ugly blur in full screen that ive gotten from someone; has been giving a, seemingly, harmless error, but id still like to keep my game as error free as possible. The code is pretty simple, but I dont have much coding knowledge so I dont know whats wrong with it.

''ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
if (filename) {
var path = folder + encodeURIComponent(filename) + '.png'; var bitmap = this.loadNormalBitmap(path, hue || 0); //console.log("disabling smoothing for "+path); bitmap.smooth = false; return bitmap;
}
else {
return this.loadEmptyBitmap();
}
}
;That will switch to nearest neighbor for all bitmap loads.''

To add to this, I also had to put in this in the ''index.html'' file: <style type="text/css"> CANVAS{image-rendering: pixelated;}</style>

This is the error: Smooth_Fullscreen.js:9 Uncaught SyntaxError: Unexpected identifier
Could you please repost the code using the [code][/code] tag? Unexpected identifier is most likely to be a syntax error, like an extra symbol or an unclosed tag.
Could you please repost the code using the
Code:
tag? Unexpected identifier is most likely to be a syntax error, like an extra symbol or an unclosed tag.
oh yes, sure
Code:
ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
if (filename) {
var path = folder + encodeURIComponent(filename) + '.png'; var bitmap = this.loadNormalBitmap(path, hue || 0); //console.log("disabling smoothing for "+path); bitmap.smooth = false; return bitmap;
}
else {
return this.loadEmptyBitmap();
}
}
;That will switch to nearest neighbor for all bitmap loads.
Try replacing with this one:

Code:
ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
    if (!filename) {
        return this.loadEmptyBitmap();
    }

    var path = folder + encodeURIComponent(filename) + '.png';
  
    var bitmap = this.loadNormalBitmap(path, hue || 0);
    bitmap.smooth = false;
  
    return bitmap;
};
Try replacing with this one:

Code:
ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
    if (!filename) {
        return this.loadEmptyBitmap();
    }

    var path = folder + encodeURIComponent(filename) + '.png';
 
    var bitmap = this.loadNormalBitmap(path, hue || 0);
    bitmap.smooth = false;
 
    return bitmap;
};
works like a charm, thanks buddy!

Original thread: https://forums.rpgmakerweb.com/threads/seemingly-harmless-uncaught-syntaxerror-unexpected-identifier.84122/