[gnome-shell] NetworkMenu: fixup device descriptions



commit b2b685e46d489f101b94f1ad23c0794804c274fc
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Mar 29 14:29:26 2011 +0200

    NetworkMenu: fixup device descriptions
    
    Fix some bugs in Util.fixupPCIDescription(), that caused all device
    descriptions to be empty.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646074

 js/misc/util.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/misc/util.js b/js/misc/util.js
index e228117..2d9cef2 100644
--- a/js/misc/util.js
+++ b/js/misc/util.js
@@ -150,7 +150,7 @@ const _IGNORED_WORDS = [
         'Incorporated',
         'Ltd.',
         'Limited.',
-        'Intel?',
+        'Intel',
         'chipset',
         'adapter',
         '[hex]',
@@ -181,7 +181,7 @@ const _IGNORED_PHRASES = [
 ];
 
 function fixupPCIDescription(desc) {
-    desc.replace(/[_,]/, ' ');
+    desc = desc.replace(/[_,]/, ' ');
 
     /* Attempt to shorten ID by ignoring certain phrases */
     for (let i = 0; i < _IGNORED_PHRASES.length; i++) {
@@ -197,7 +197,7 @@ function fixupPCIDescription(desc) {
     /* Attmept to shorten ID by ignoring certain individual words */
     let words = desc.split(' ');
     let out = [ ];
-    for (let i = 0; i < words; i++) {
+    for (let i = 0; i < words.length; i++) {
         let item = words[i];
 
         // skip empty items (that come out from consecutive spaces)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]