From facb5d8ffd4f6a81d3132515b8bae64278cf8316 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 4 Nov 2021 18:35:58 +0100 Subject: [PATCH] fix(@angular-devkit/build-angular): don't show `[NG HMR] Unknown input type` when restoring file type input (cherry picked from commit 3a89358d3318aa736637cea1cbdb55534d2b531b) --- .../build_angular/src/webpack/plugins/hmr/hmr-accept.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts index 8c05f6911cc8..ef0e5a7cd162 100644 --- a/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts +++ b/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts @@ -211,6 +211,10 @@ function restoreFormValues(oldInputs: any[], oldOptions: any[]): void { case 'week': newElement.value = oldElement.value; break; + case 'file': + // Ignored due: Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': + // This input element accepts a filename, which may only be programmatically set to the empty string. + break; default: console.warn('[NG HMR] Unknown input type ' + oldElement.type + '.'); continue;